Why am I unable to install nodemon on my mac - node.js

I am getting these errors while installing nodemon on my mac
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple/.npm/_logs/2021-06-13T14_06_45_374Z-debug.log

So, try
1th.
sudo chown -R YourLaptopName: /usr/local/lib/node_modules
2th.
sudo npm install -g nodemon
3th
nodemon -v

Related

how can i install lite-server? it keeps giving me error

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/lite-server
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/lite-server'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/lite-server'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/lite-server'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/abdulfattahsheu/.npm/_logs/2022-03-22T14_26_56_457Z-debug-
above is the error it keeps giving me
Try this commands line
npm install -g npm-windows-upgrade
npm install -g concurrently
npm install lite-server#2.3 --save-dev

how installation Protractor on mac

I am trying installation for protractor but getting error
The operation was rejected by your operating system
admin$ npm install -g protractor
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/protractor
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protractor'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protractor'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/protractor'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/admin/.npm/_logs/2022-03-05T00_08_05_266Z-debug-0.log
Try sudo
sudo npm install -g protractor

EACCES: permission denied, mkdir '/usr/local/lib/node_modules/react-native-cli'

permission denied issue in mac while installing react-native-cli
The operation was rejected by your operating system.It is likely you do not have the permissions to access this file as the current user
npm install -g react-native-cli
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/react-native-cli
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir
'/usr/local/lib/node_modules/react-native-cli'
npm ERR! [Error: EACCES: permission denied, mkdir
'/usr/local/lib/node_modules/react-native-cli'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/react-native-cli'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/intersoft-admin/.npm/_logs/2021-11-10T09_56_34_035Z-debug.log
try this command
sudo npm install -g react-native-cli

Why is permission denied in terminal when I tried to install sass using node.js

Why can't I install? Help! I followed this tutorial and it told me to install node.js and I did.
karenchan:~ karenchan$ npm install -g sass
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/karenchan/.npm/_logs/2020-07-30T20_33_04_760Z-debug.log
karenchan:~ karenchan$ npm install -g sass
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/karenchan/.npm/_logs/2020-07-30T20_44_30_523Z-debug.log
karenchan:~ karenchan$
This is the problem:
Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
Two solutions:
Install globally as "root", using sudo
sudo npm install -g sass
Install locally (so "permissions" shouldn't be an issue):
cd <<my project>>
npm install sass
FYI, other options might include:
Edit your project's package.json
Install and use NVM
Here's a good tutorial on the latter:
Installing Node.js Tutorial: Using nvm, Tierney Cyren

I get an installation error, when trying to install Firebase

I am typing npm install -g firebase-tools but terminal gives me this message:
checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules 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 ERR! {
[Error: EACCES: permission denied, access
'/usr/local/lib/node_modules'] npm ERR! stack: npm ERR! 'Error:
EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall:
'access', npm ERR! path: '/usr/local/lib/node_modules' } 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 (though this is not recommended).
npm ERR! A complete log of this run can be found in: npm ERR!
/Users/skltn/.npm/_logs/2018-07-08T19_03_42_011Z-debug.log
Skeletons-MacBook-Pro:~ skltn$ firebase --help
-bash: firebase: command not found Skeletons-MacBook-Pro:~ skltn$ firebase -login
-bash: firebase: command not found Skeletons-MacBook-Pro:~ skltn$ npm install -g firebase-tools npm WARN checkPermissions Missing write
access to /usr/local/lib/node_modules npm ERR! path
/usr/local/lib/node_modules 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 ERR! { [Error: EACCES:
permission denied, access '/usr/local/lib/node_modules'] npm ERR!
stack: npm ERR! 'Error: EACCES: permission denied, access
\'/usr/local/lib/node_modules\'', npm ERR! errno: -13, npm ERR!
code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path:
'/usr/local/lib/node_modules' } 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 (though this is not recommended).
npm ERR! A complete log of this run can be found in: npm ERR!
/Users/skltn/.npm/_logs/2018-07-08T19_05_23_066Z-debug.log
Skeletons-MacBook-Pro:~ skltn$
This is a permission error, you should use sudo:
sudo npm install -g firebase-tools

Resources