Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2815

How can I fix the error message "code EACCES" when I tried to install the react-router-dom node?

$
0
0

I have tried this many times and had this issue in the past, when I tried to install a different node package in another project. I moved on without that other package but now I'm stuck. I've tried to unset the read properties for everything in my working directory. I've used the sudo commands to install packages and change the file owner. I've disabled controlled access in windows. The other commands from the web that I tried aren't recognized at all. I guess I have to remove and re-install ubuntu. I'm not sure what else to do at this point. For context, my experience is limited with Ubuntu and using a terminal in general. I'm using it for web development so, npm install, run and test are pretty much all I ever use. Now it doesn't work. Thanks in advance!

~/development/code/phase-2/react-hooks-react-router-code-along$ npm install react-router-dom@5
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/type-fest
npm ERR! dest /home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/.type-fest-KEXQjTnf
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/type-fest' -> '/home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/.type-fest-KEXQjTnf'
npm ERR! [Error: EACCES: permission denied, rename '/home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/type-fest' -> '/home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/.type-fest-KEXQjTnf'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/type-fest',
npm ERR! dest: '/home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/.type-fest-KEXQjTnf'
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! /home/bambam320/.npm/_logs/2022-09-13T06_04_28_484Z-debug-0.log

UPDATE**: I checked permissions and was finally able to change them but it's not a permission issue. It's trying to rename a file that has all the permissions. I'm not sure why it's returning an error, the package itself is very common.


file: home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/type-fest
#owner: bambam320
#group: bambam320
user::rwx
group::rwx
other::rwx


File: /home/bambam320/development/code/phase-2/react-hooks-react-router-code-along/node_modules/type-fest
Size: 512 Blocks: 0 IO Block: 512 directory
Device: 2h/2d Inode: 1125899909662013 Links: 1
Access: (0777/drwxrwxrwx) Uid: ( 1000/bambam320) Gid: ( 1000/bambam320)
Access: 2022-09-13 02:04:08.504282200 -0400
Modify: 2022-09-11 02:36:32.761662300 -0400
Change: 2022-09-13 02:04:07.077342300 -0400
Birth: -


Viewing all articles
Browse latest Browse all 2815


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>