【发布时间】:2018-05-18 17:05:29
【问题描述】:
Windows 10,Git Bash(作为管理员),尝试:npm install --save-dev webpack-stream 并得到了这个:
npm ERR! path D:\Projects\SomeProject\frontend\node_modules\fsevents\node_modules\getpass\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'D:\Projects\SomeProject\frontend\node_modules\fsevents\node_modules\getpass\node_modules'
npm ERR! { Error: EPERM: operation not permitted, lstat 'D:\Projects\SomeProject\frontend\node_modules\fsevents\node_modules\getpass\node_modules'
npm ERR! stack: 'Error: EPERM: operation not permitted, lstat \'D:\\Projects\\SomeProject\\frontend\\node_modules\\fsevents\\node_modules\\getpass\\node_modules\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path: 'D:\\Projects\\SomeProject\\frontend\\node_modules\\fsevents\\node_modules\\getpass\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2017-12-05T05_24_31_143Z-debug.log
我正在尝试:
npm cache verify
和:
npm cache clean -f
没有结果。
尝试关闭防病毒软件 - 没有结果。尝试以管理员身份运行 cmd 然后:cd project-folder -> npm install --save-dev webpack-stream - 没有结果。
npm -v
5.5.1
node -v
v8.9.1
是否有可能解决我的问题?
【问题讨论】:
-
您找到解决方案了吗?
-
我没有,现在我安装这样的包:npm i packName*@*previous version --save。不是最佳解决方案,但它有效。
标签: node.js git npm webpack npm-install