Npm 请再次尝试使用此命令作为 root/administrator |安装 bootstrap jquery 包时出错

Npm Please try using this command again as root/administrator | error when install bootstrap jquery package

正常显示这个 :

E:\NG4.Admin Panels\SupperAdmin>npm install bootstrap jquery --save npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it! npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it! [
......] - postinstall: info lifecycle jquery@3.2.1~postinstall: jquery@3.2.1

它会在 70% 时安装包,然后(之前的消息)然后等待几分钟,然后显示以下消息:

E:\NG4.Admin Panels\SupperAdmin>npm install bootstrap jquery --save npm WARN read-shrinkwrap 此版本的 npm 与 lockfileVersion@1 兼容,但 npm-shrinkwrap.json 是为 lockfileVersion@0 生成的。我会努力做到最好的! npm WARN read-shrinkwrap 此版本的 npm 与 lockfileVersion@1 兼容,但 npm-shrinkwrap.json 是为 lockfileVersion@0 生成的。我会努力做到最好的! 错误!路径 E:\NG4.Admin Panels\SupperAdmin\node_modules\fsevents\node_modules\assert-plus\package.json 错误!代码 EPERM 错误!错误号-4048 错误!系统调用取消链接 错误!错误:EPERM:不允许操作,取消链接 'E:\NG4.Admin Panels\SupperAdmin\node_modules\fsevents\node_modules\assert-plus\package.json' 错误! { 错误:EPERM:不允许操作,取消链接 'E:\NG4.Admin Panels\SupperAdmin\node_modules\fsevents\node_modules\assert-plus\package.json' 错误!堆栈:'错误:EPERM:不允许操作,取消链接 \'E:\NG4.Admin Panels\SupperAdmin\node_modules\fsevents\node_modules\assert-plus\package.json\'', 错误!错误号:-4048, 错误!代码:'EPERM', 错误!系统调用:'unlink', 错误!路径:'E:\NG4.Admin Panels\SupperAdmin\node_modules\fsevents\node_modules\assert-plus\package.json'} 错误! 错误!请以 root/Administrator.

的身份再次尝试 运行 执行此命令

npm 错误!此 运行 的完整日志可在以下位置找到: 错误! C:\Users\Sayed\AppData\Roaming\npm-cache_logs17-09-14T05_48_28_139Z-debug.log

E:\NG4.Admin Panels\SupperAdmin>

See this image Click here

E:\NG4.Admin Panels\SupperAdmin>

您的问题与此github issue有关。

运行 npm i --no-optional 来解决这个问题。 您还可以降级您正在使用的 npm 版本。