简体   繁体   中英

Trying to install bootstrap to my angular project

As the title says i'm trying to install bootstrap 4 into my angular project running the terminal command:

npm install --save bootstrap@next

Which is exactly how I've done it every time, however this time i'm receiving this error:

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. 

Any one had this problem before? I've tried updating to a newr version of npm but I get this error:

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

Issue 1:

npm install --save bootstrap

Issue 2:

Error: EACCES: permission denied error comes when you donot have permission to install packages for normal user.

Try with sudo ,

sudo npm install -g npm

You should do it as a root user

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM