[英]npm install - ERR! addLocal Could not install on Windows 10
[英]npm ERR! addLocal could not install in windows
刚开始一项新工作,并且必须在Windows上运行节点(我的所有同事都在其中使用OSX,可以很好地检查它的运行状况)
当npm时,我一直无法获取addLocal的安装,这似乎是在尝试访问%APPDATA%中的临时目录(没有任何特殊权限),在我的同事使用相同版本的node和npm的情况下(但在Mac中)没有看到这些。
我也尝试将节点降级到10.35,但是我遇到了另一个问题。 有谁知道会是什么情况?
这是标准输出:
C:\Users\litehsu\workspace\myworkspace>npm install
npm WARN package.json Dependency 'grunt-sonar-runner' exists in both dependencies and devDependencies, using 'grunt-sonar-runner@2.4.3' from dependencies
npm ERR! addLocal Could not install C:\Users\litehsu\AppData\Local\Temp\npm-5440-6f1004b8\git-cache-ecdc41ed33a0\2fd99696c3f2705dcd6813454b50ad5591651427
npm ERR! addLocal Could not install C:\Users\502438~1\AppData\Local\Temp\npm-5440-6f1004b8\git-cache-87d2760d189d\e52092778d61d32bb10e3aa062bbbfaf583d2107
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path C:\Users\502438914\AppData\Roaming\npm-cache\karma-support\1.0.2\package.tgz
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! enoent ENOENT, scandir 'C:\Users\litehsu\AppData\Roaming\npm-cache\karma-support\1.0.2\package.tgz'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\litehsu\workspace\npm-debug.log
谢谢!
使用配置更改位置:
npm config ls -l
将它们都更改为新路径。 例如:
npm config set cache %USERPROFILE%\\npm-cache npm config set tmp %USERPROFILE%\\tmp
会将它们放在您的个人资料文件夹中。
在所有.npmrc
文件位置中进行相同的编辑:
%appdata%\\npm\\node_modules\\npm\\.npmrc
%ProgramFiles%\\nodejs\\node_modules\\npm\\.npmrc
%USERPROFILE%\\.npmrc
参考
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.