正如标题所说,我正在尝试将bootstrap 4安装到运行终端命令的角度项目中:
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
答案 0 :(得分:1)
问题1:
npm install --save bootstrap
问题2:
错误:EACCES:权限被拒绝错误,如果您没有正常用户安装软件包的权限。
尝试sudo
,
<强> sudo npm install -g npm
强>
您应该以{{1}}
的身份进行操作