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
Related
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
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
I have to install npm package hence used command - npm install -g <package-name> but it resulted into write access error so I changed permissions as follows with refernce to https://flaviocopes.com/npm-fix-missing-write-access-error/
sudo chown -R $USER /opt/node-v10.22.0-linux-x64/lib/node_modules/
and tried again but if failed again -
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/requirejs/bin/r.js
npm ERR! dest /opt/node-v10.22.0-linux-x64/bin/r.js
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/requirejs/bin/r.js' -> '/opt/node-v10.22.0-linux-x64/bin/r.js'
npm ERR! { [Error: EACCES: permission denied, symlink '../lib/node_modules/requirejs/bin/r.js' -> '/opt/node-v10.22.0-linux-x64/bin/r.js']
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/requirejs/bin/r.js' -> '/opt/node-v10.22.0-linux-x64/bin/r.js'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/requirejs/bin/r.js',
npm ERR! dest: '/opt/node-v10.22.0-linux-x64/bin/r.js' },
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, symlink \'../lib/node_modules/requirejs/bin/r.js\' -> \'/opt/node-v10.22.0-linux-x64/bin/r.js\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/requirejs/bin/r.js',
npm ERR! dest: '/opt/node-v10.22.0-linux-x64/bin/r.js' }
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.
also when I run command with sudo, it gives npm not found. Please guide what is wrong here.
you need read write permissions to /opt/node-v10.22.0-linux-x64/ as it creates a symlink there for you.
you can also check the destination in error it clearly says you don't have permission there.
I want to use react in vscode but when I try to install node.js it gives me errors. my command is
npm install -g create-react-app
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/create-react-app/index.js
npm ERR! dest /usr/local/bin/create-react-app
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/create-react-app/index.js' -> '/usr/local/bin/create-react-app'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/create-react-app/index.js' -> '/usr/local/bin/create-react-app'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/create-react-app/index.js' -> '/usr/local/bin/create-react-app'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/create-react-app/index.js',
npm ERR! dest: '/usr/local/bin/create-react-app'
npm ERR! },
npm ERR! stack: "Error: EACCES: permission denied, symlink '../lib/node_modules/create-react-app/index.js' -> '/usr/local/bin/create-react-app'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/create-react-app/index.js',
npm ERR! dest: '/usr/local/bin/create-react-app'
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/defneyazicioglu/.npm/_logs/2020-03-23T17_10_48_130Z-debug.log
How can I solve this
Try these commands :
$sudo -s
$npm install -g create-react-app
$exit
$npx create-react-app my-app
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