2

我正在尝试安装 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

是什么导致了问题?

4

1 回答 1

0

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

您也可以尝试以下想法:

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

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

于 2017-09-08T02:54:50.097 回答