安装vue Cli脚手架报错
- 使用
cnpm install -g @vue/cli
- 发生以下报错
[31/35] vue@^2.6.14 installed at node_modules\.store\vue@2.7.16\node_modules\vue
[npminstall:runscript:error] @vue/cli-ui@5.0.8 › apollo-server-express@3.13.0 › apollo-server-types@3.8.0 › apollo-reporting-protobuf@3.4.0 › @apollo/protobufjs@1.2.6 run postinstall node scripts/postinstall error: Error: Command failed with ENOENT: node scripts/postinstall
spawn C:\Program Files\MySQL\MySQL Server 8.0\bin\ ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:284:19)
at onErrorNT (node:internal/child_process:477:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\',
path: 'C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\',
spawnargs: [Array],
originalMessage: 'spawn C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\ ENOENT',
shortMessage: 'Command failed with ENOENT: node scripts/postinstall\n' +
'spawn C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\ ENOENT',
command: 'node scripts/postinstall',
escapedCommand: 'node "scripts/postinstall"',
exitCode: undefined,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Install fail! Error: run postinstall error, please remove node_modules before retry!
Command failed with ENOENT: node scripts/postinstall
spawn C:\Program Files\MySQL\MySQL Server 8.0\bin\ ENOENT
Error: Command failed with ENOENT: node scripts/postinstall
spawn C:\Program Files\MySQL\MySQL Server 8.0\bin\ ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:284:19)
at onErrorNT (node:internal/child_process:477:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npminstall version: 7.12.0
npminstall argv: D:\node-v18.20.3-win-x64\node.exe D:\node-v18.20.3-win-x64\node_global\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\awake\.cnpmrc --disturl=https://cdn.npmmirror.com/binaries/node --registry=https://registry.npmmirror.com -g @vue/cli