Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Bug]: [toolkit/pro] @opentiny/tiny-toolkit-pro 安装报错 #118

Open
fengyon opened this issue Nov 9, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@fengyon
Copy link
Contributor

fengyon commented Nov 9, 2023

Version

v1.0.1

node-version

14.17.3

Link to minimal reproduction

No response

Step to reproduce

npm install @opentiny/cli -g
tiny init pro

What is expected

the pro toolkit install success

What is actually happening

the pro toolkit install failed

2023-11-08 11:33:55 [core-commands]: 当前目录下已存在文件,继续执行初始化会覆盖已存在的同名文件
? 确认需要继续执行初始化,请输入(y) y
2023-11-08 11:33:57 [core-module]: 本地尚未安装 @opentiny/tiny-toolkit-pro ,正在执行自动安装...
internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'node:util'
Require stack:
- C:\Users\xxx\AppData\Roaming\npm\node_modules\@opentiny\cli\node_modules\npminstall\bin\install.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (C:\Users\xxx\AppData\Roaming\npm\node_modules\@opentiny\cli\node_modules\npminstall\bin\install.js:3:15)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\xxx\\AppData\\Roaming\\npm\\node_modules\\@opentiny\\cli\\node_modules\\npminstall\\bin\\install.js'
  ]
}
2023-11-08 11:33:57 [core-module]: @opentiny/tiny-toolkit-pro 安装报错,请确认该package是否存在!
2023-11-08 11:33:57 [core-module]: Error: 安装  失败!为了保证项目稳定性,请删除本地失败的node_modules后再重试。可执行命令: rm -rf node_modules
    at ChildProcess.<anonymous> (C:\Users\xxx\AppData\Roaming\npm\node_modules\@opentiny\cli\node_modules\@opentiny\cli-devkit\lib\npm\index.js:242:24)
    at ChildProcess.emit (events.js:375:28)
    at ChildProcess.cp.emit (C:\Users\xxx\AppData\Roaming\npm\node_modules\@opentiny\cli\node_modules\cross-spawn\lib\enoent.js:34:29)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

Any additional comments (optional)

the reason is
The lowest node version of npminstall who is a dependency of cli/dev-kit is 16

@fengyon
Copy link
Contributor Author

fengyon commented Nov 9, 2023

The temporary repair measure is change the version to 16 of the node

The nvm is recommended:
mac、linux: https://github.com/nvm-sh/nvm
windows: https://github.com/coreybutler/nvm-windows

@kagol kagol added the bug Something isn't working label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants