npm不是以管理身份运行遇到的问题

环境:win10+npm3.10.5

问题:在npm install lodash时,出现下列错误("npm-debug.log"文件内容)

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@3.10.5
3 info using node@v4.4.7
4 verbose stack Error: ENOENT: no such file or directory, open 'C:\Program Files\nodejs\package.json'
4 verbose stack at Error (native)
5 verbose cwd C:\Program Files\nodejs
6 error Windows_NT 10.0.10586
7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
8 error node v4.4.7
9 error npm v3.10.5
10 error path C:\Program Files\nodejs\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'C:\Program Files\nodejs\package.json'
15 error enoent ENOENT: no such file or directory, open 'C:\Program Files\nodejs\package.json'
15 error enoent This is most likely not a problem with npm itself
15 error enoent and is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]

解决:以管理员身份运行就可以工作了

npm不是以管理身份运行遇到的问题

上一篇:sqlserver 并发机制


下一篇:kvm日常维护