仍然“请尝试以root / Administrator身份再次运行此命令。”

问题描述 投票:3回答:2

Windows 10,Git Bash(作为管理员),试图:qazxsw poi并得到了这个:

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

没有结果。

尝试关闭防病毒 - 而不是结果。尝试以管理员身份运行cmd然后:npm cache clean -f - 没有结果。

cd project-folder -> npm install --save-dev webpack-stream

有可能解决我的问题吗?

node.js git npm webpack npm-install
2个回答
0
投票

对我有用的是单击项目文件夹右键,选择“属性”,然后取消选择“只读”,然后“应用”。


-1
投票

试试这个

npm -v
5.5.1

node -v
v8.9.1

npm config set unsafe-perm=true

© www.soinside.com 2019 - 2024. All rights reserved.