When I try to execute npx create-react-app client
the result is always:
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../@babel/parser/bin/babel-parser.js
npm ERR! dest /media/veracrypt1/Mega/Dev/JOBIFY/client/node_modules/.bin/parser
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../@babel/parser/bin/babel-parser.js' -> '/media/veracrypt1/Mega/Dev/JOBIFY/client/node_modules/.bin/parser'
npm ERR! [Error: EPERM: operation not permitted, symlink '../@babel/parser/bin/babel-parser.js' -> '/media/veracrypt1/Mega/Dev/JOBIFY/client/node_modules/.bin/parser'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../@babel/parser/bin/babel-parser.js',
npm ERR! dest: '/media/veracrypt1/Mega/Dev/JOBIFY/client/node_modules/.bin/parser'
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/shmue/.npm/_logs/2022-08-11T13_45_19_897Z-debug-0.log
Aborting installation.
This is because I am not root.
It is essential that I can complete this action as the non root user.
After 20 minutes of googling I am yet to find my solution.
I am using Ubuntu 20.
Please assist me.
Many thanks, 🙂
Samuel
PS: I have already chowned the user’s .npm file to this user.
As per one of the answers, I updated the users .bashrc file:
Click to view my user’s .bashrc file
Sadly the issue is not resolved!
2
Answers
You can do this operation in one of your system drivers
You can add this inside your .bashrc, and log off and log in
Source: https://wiki.archlinux.org/title/Node.js