I try upgrade expo cli to latest version. i got this error.
DALAs-MacBook-Pro:~ SEAR$ npm i -g expo-cli
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/expo-cli
npm ERR! dest /usr/local/lib/node_modules/.expo-cli-dKBr48UN
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'
npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/local/lib/node_modules/expo-cli',
npm ERR! dest: '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'
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/sear/.npm/_logs/2021-06-26T14_35_24_132Z-debug.log
Node : v13.14.0
NPM : 7.7.5
Current Expo : 3.18.0
Please help, Thank in advance.
it was fixed by running sudo npm i -g expo-cli.
Related
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
I am trying to run the following command in VScode while using WSL-ubuntu:
npx create-react-app front_end --template typescript
But I get this error message:
Initialized a git repository.
Installing template dependencies using npm...
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/node
npm ERR! dest /mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/.node-GHmM5nSq
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/node' -> '/mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/.node-GHmM5nSq'
npm ERR! [Error: EACCES: permission denied, rename '/mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/node' -> '/mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/.node-GHmM5nSq'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/node',
npm ERR! dest: '/mnt/c/Users/user/documents/blockchain/sizzlingstaking/front_end/node_modules/#types/.node-GHmM5nSq'
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! /root/.npm/_logs/2022-03-12T12_31_21_261Z-debug-0.log
`npm install --no-audit --save #testing-library/jest-dom#^5.14.1 #testing-library/react#^12.0.0 #testing-library/user-event#^13.2.1 #types/jest#^27.0.1 #types/node#^16.7.13 #types/react#^17.0.20 #types/react-dom#^17.0.9 typescript#^4.4.2 web-vitals#^2.1.0` failed
Any idea what is going wrong?
After writing npm install -g npm I get:
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/local/lib/node_modules/npm',
npm ERR! dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
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/marc/.npm/_logs/2021-12-13T16_06_54_229Z-debug.log
It is a permission issue. If you are on Mac, use:
sudo npm install (whatever your package name is)
and then it will prompt you to type in your password to your computer. Doing this will fix it.
If you are not on Mac, I would find the equivalent of sudo for that.
I'm trying to install expo-cli using npm install -g expo-cli, however come across this issue. I've looked at other posts and they have similar issues but the syscall seems to be different. Any solutions recommended by them does not seem to work. I believe it has something to do with how npm was installed, however unsure how to continue. Running npm list -g returns the following:
/usr/local/lib
└─┬ npm#6.14.5
shouldn't that be under /usr/local/lib/node?
The error I get is as follows:
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/expo-cli/bin/expo.js
npm ERR! dest /usr/local/bin/expo
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/expo-cli/bin/expo.js',
npm ERR! dest: '/usr/local/bin/expo'
npm ERR! },
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/expo-cli/bin/expo.js',
npm ERR! dest: '/usr/local/bin/expo'
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/my_user_name/.npm/_logs/2020-07-07T22_13_27_629Z-debug.log
Try this - sudo npm install --unsafe-perm -g expo-cli It works for me
I wanted to update new version of npm 6.4.0 from npm 6.1.0 , using cli command
npm install -g npm
but I got error while updating
npm ERR! path /usr/local/lib/node_modules/npm/node_modules/ansi-regex
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/ansi-regex'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/ansi-regex'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm/node_modules/ansi-regex\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/npm/node_modules/ansi-regex' }
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/user/.npm/_logs/2018-08-23T06_53_24_306Z-debug.log
For ubuntu/linux you have to use below command :
sudo npm install -g npm