npm -v报错:尝试了node的最新版、稳定版、64位、32位,全试过了,系统也重装了几次。只有系统刚重装的时候可以用,过两天就不能用了,又重装系统,又能用两天。真的很灰心,请求大神帮我看看是怎么回事,跪谢。
错误日志:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'prefix',
1 verbose cli '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: spawn C:\Program Files (x86)\nodejs\node.exe ENOENT
4 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
4 verbose stack at onErrorNT (internal/child_process.js:407:16)
4 verbose stack at process.internalTickCallback (internal/process/next_tick.js:72:19)
5 verbose cwd C:\Users\Administrator
6 verbose Windows_NT 10.0.16299
7 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "prefix" "-g"
8 verbose node v11.0.0
9 verbose npm v6.4.1
10 error path C:\Program Files (x86)\nodejs\node.exe
11 error code ENOENT
12 error errno ENOENT
13 error syscall spawn C:\Program Files (x86)\nodejs\node.exe
14 error enoent spawn C:\Program Files (x86)\nodejs\node.exe ENOENT
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ 1, true ]
错误日志:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'prefix',
1 verbose cli '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: spawn C:\Program Files (x86)\nodejs\node.exe ENOENT
4 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
4 verbose stack at onErrorNT (internal/child_process.js:407:16)
4 verbose stack at process.internalTickCallback (internal/process/next_tick.js:72:19)
5 verbose cwd C:\Users\Administrator
6 verbose Windows_NT 10.0.16299
7 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "prefix" "-g"
8 verbose node v11.0.0
9 verbose npm v6.4.1
10 error path C:\Program Files (x86)\nodejs\node.exe
11 error code ENOENT
12 error errno ENOENT
13 error syscall spawn C:\Program Files (x86)\nodejs\node.exe
14 error enoent spawn C:\Program Files (x86)\nodejs\node.exe ENOENT
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ 1, true ]
装在C盘和D盘都试过,问题依旧。
系统也还过几个版本了,还是没解决。
跪求大神赐教!