盖伦框架安装失败

galenframework installation failed

我正在尝试安装 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\_logs17-09-07T09_14_22_408Z-debug.log

导致问题的原因是什么?

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

您也可以尝试以下想法:

  1. 禁用任何防病毒扫描程序
  2. 更改缓存并重试:

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