2017-09-05 265 views
1

我长时间使用npm(使用win 10) - 没有更改防火墙/权限等任何内容,突然间我在尝试安装时遇到以下错误任何包装:安装npm包时出错

C:\udemy-button>npm install bootstrap --save npm ERR! path C:\udemy-button\node_modules\fsevents\node_modules\aws4\package.json npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'C:\udemy-button\node_modules\fsevents\node_modules\aws4\package.json' npm ERR! at Error (native) npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\udemy-button\node_modules\fsevents\node_modules\aws4\package.json' npm ERR! at Error (native) npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\udemy-button\node_modules\fsevents\node_modules\aws4\package.json\'\n at Error (native)', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: 'C:\udemy-button\node_modules\fsevents\node_modules\aws4\package.json' } 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\Roy Barak\AppData\Roaming\npm-cache_logs\2017-09-05T13_12_42_361Z-debug.log

我也试着用管理员权限打开CMD和运行从那里故宫 - 但我得到了同样的错误 - enter image description here

我已经做了以下步骤:

  1. 清洁NPM缓存
  2. 检查文件夹权限
  3. 重新安装节点
  4. 重新启动我的机器

这里是日志文件 - 仅这关系到错误

最后一部分1569愚蠢doParallel预安装894 1570傻预安装[email protected] 1571信息生命周期[email protected]~preinstall:[email protected] 0.7 1572傻DOSERIAL建立894 1573傻构建[email protected] 1574信息linkStuff [email protected] 1575傻linkStuff [email protected]有C:\ udemy键\ node_modules作为其父node_modules 1576详细linkBins [email protected] 1577冗长linkMans [email protected] 1578傻DOSERIAL全球链接894 1579傻doParallel更新联894 1580傻DOSERIAL安装894 1581傻安装[email protected] 1582信息生命周期[email protected]~install:[email protected] 1583傻系列安装后安装894 1584傻后安装[email protected] 1585 info lifecycle [email protected]~postinstall:[email protected] 1586详细解锁使用C:\ Users \ Roy Barak \ AppData \ Roaming \ npm-cache_locks \ staging-e7bff0426a609d7b.lock完成C:\ udemy-按钮\ node_modules.staging 1587详细堆栈错误:EPERM:操作不允许,取消链接'C:\ udemy-button \ node_modules \ fsevents \ node_modules \ aws4 \ package.json' 1587详细堆栈错误(本地) 1588详细cwd C:\ udemy-button 1589 verbose Windows_NT 10.0.15063 1590详细argv“C:\ Program Files \ nodejs \ node.exe”“C:\ Users \ Roy Barak \ AppData \ Roaming \ npm \ node_modules \ npm \ bin \ npm-cli.js“”install“”bootstrap“ 1591详细节点v6.11.2 1592详细npm v5.4.0 1593错误路径C:\ udemy-button \ node_modules \ fsevent小号\ node_modules \ aws4 \的package.json 1594错误代码EPERM 1595错误错误号-4048 1596错误的系统调用取消关联 1597错误错误:EPERM:不允许操作,解除连结“C:\ udemy按钮\ node_modules \ fsevents \ node_modules \ aws4 \ package.json' 错误1597错误(本地) 1597错误{错误:EPERM:操作不允许,取消链接'C:\ udemy-button \ node_modules \ fsevents \ node_modules \ aws4 \ package.json' 1597错误(原生) 1597错误堆栈:'错误:EPERM:操作不允许,取消链接\'C:\ udemy-button \ node_modules \ fsevents \ node_modules \ aws4 \ package。json \'\ n在错误(本地)', 1597错误errno:-4048, 1597错误代码:'EPERM', 1597错误系统调用:'unlink', 1597错误路径:'C:\ udemy-button \ node_modules \ fsevents \ node_modules \ aws4 \的package.json”} 1598错误,请重试运行此命令,作为根/管理员。 1599冗长退出[-4048,真]

+0

你尝试做什么它告诉你做什么? !NPM ERR C:'请重试运行此命令,作为根/ Administrator.' – Jaxi

+0

是啊..我打开具有管理员权限的cmd并试图 - - 同样的错误UPDATE – RoyBarOn

+0

'“这个运行的完整的日志可以发现地: \ Users \ Roy Barak \ AppData \ Roaming \ npm-cache_logs \ 2017-09-05T13_12_42_361Z-debug.log“'您可以发布该文件吗? – Paul

回答