Title speaks for itself mostly.
Upon trying to install bootstrap in my project:
npm i bootstrap@5.2.3
I receive error codes:
npm ERR! syscall open
npm ERR! path /Users/samgoldrick/package.json
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, open '/Users/samgoldrick/package.json'
npm ERR! [Error: EACCES: permission denied, open '/Users/samgoldrick/package.json'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: '/Users/samgoldrick/package.json'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
This is strange because I don't have issues installing npm packages globally but run into issues installing them locally in projects.
Any help appreciated!
EDIT
Complete oversight on my part. I was running commands outside of the project dir accidentally, forgot to cd in using vscode terminal, thanks for the answers regardless.