galenframework安装失败

我正在尝试安装Galenframework。 我之前已经使用了GalenFramework:

npm uninstall-g galenframework-cli 

现在,当我试图再次使用它安装

 npm install-g galenframework-cli 

我收到以下错误信息:

 info Install exited unexpectedly npm WARN Error: EPERM: operation not permitted, unlink 'C:\Users\username\AppData\Roaming\npm\node_modules\galenframework-cli\node_modules\ansi-styles\package.json' npm WARN at Error (native) npm WARN { Error: EPERM: operation not permitted, unlink 'C:\Users\username\AppData\Roaming\npm\node_modules\galenframework-cli\node_modules\ansi-styles\package.json' npm WARN at Error (native) npm WARN stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\galenframework-cli\\node_modules\\ansi-styles\\package.json\'\n at Error (native)', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'unlink', npm WARN path: 'C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\galenframework-cli\\node_modules\\ansi-styles\\package.json' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! galenframework-cli@2.3.5 postinstall: `node postinstall.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the galenframework-cli@2.3.5 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\username\AppData\Roaming\npm-cache\_logs\2017-09-07T09_14_22_408Z-debug.log 

是什么导致了这个问题?

尝试使用pipe理权限安装。 以pipe理员身份打开一个shell

你也可以尝试下面的想法:

  1. 禁用任何反病毒扫描程序
  2. 更改caching并重试:

npm config set cache-lock-retries 1000 npm config set cache-lock-wait 100000