【问题标题】:Trying to install bootstrap to my angular project尝试将引导程序安装到我的 Angular 项目中
【发布时间】:2018-04-11 14:21:03
【问题描述】:

正如标题所说,我正在尝试将 bootstrap 4 安装到运行终端命令的 Angular 项目中:

npm install --save bootstrap@next

这正是我每次都这样做的方式,但是这次我收到了这个错误:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for bootstrap@next
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist. 

以前有人遇到过这个问题吗?我尝试更新到新版本的 npm,但出现此错误:

npm ERR! path /usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/ssri
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/ssri'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/ssri'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/ssri\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/ssri' }
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!     /Users/James/.npm/_logs/2018-04-11T14_11_56_140Z-debug.log

【问题讨论】:

  • 没有bootstrap@next ...试试npm install --save bootstrap

标签: angular npm terminal


【解决方案1】:

问题 1:

npm install --save bootstrap

问题 2:

Error: EACCES: permission denied 当您没有普通用户安装软件包的权限时会出现错误。

试试sudo

sudo npm install -g npm

您应该以root user 的身份进行操作

【讨论】:

  • @JamesRees,你检查过这个吗?
猜你喜欢
  • 1970-01-01
  • 2019-06-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-04-05
  • 2020-02-05
  • 2023-03-07
  • 1970-01-01
相关资源
最近更新 更多