【问题标题】:Error when adding bootstrap to an angular-cli project将引导程序添加到 angular-cli 项目时出错
【发布时间】:2018-08-24 15:25:49
【问题描述】:

使用 angular-cli 将引导程序添加到 Angular 项目时出现此错误

npm install bootstrap@3 jquery --save
npm ERR! path C:\Users\cw\Desktop\Basic-angular\got\node_modules\.staging
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\cw\Desktop\Basic-angular\got\node_modules\.staging'
npm ERR!  { Error: EPERM: operation not permitted, unlink 'C:\Users\cw\Desktop\Basic-angular\got\node_modules\.staging'
npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\cw\\Desktop\\Basic-angular\\got\\node_modules\\.staging\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'C:\\Users\\cw\\Desktop\\Basic-angular\\got\\node_modules\\.staging' }
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\cw\AppData\Roaming\npm-cache\_logs\2018-08-18T11_54_33_403Z-debug.log

【问题讨论】:

  • 您好!请在您的描述中添加一个实际问题。在当前状态下,这不是问题,应该删除。请阅读how to ask a good question

标签: angular angular-cli angular-ui-bootstrap


【解决方案1】:

错误消息显示“以管理员身份运行此命令”。如果您使用的是 cmd,请尝试以管理员身份运行 cmd。

【讨论】:

  • 我如何以管理员身份使用cmd
  • 在“开始”菜单的搜索字段中键入 cmd。右键单击 Cmd 应用程序,然后单击“以管理员身份运行”
  • 现在它显示 npm ERR!请尝试以 root/管理员身份再次运行此命令。
猜你喜欢
  • 2017-07-29
  • 2023-04-05
  • 1970-01-01
  • 2020-08-19
  • 2017-11-19
  • 2017-11-29
  • 1970-01-01
  • 2019-07-01
  • 2016-09-23
相关资源
最近更新 更多