npm start EACCES permission denied
npm start fails with the error below:
Compiled with problems:X
ERROR in ./src/logo.svg
Module build failed (from ./node_modules/@svgr/webpack/lib/index.js): Error: EACCES: permission denied, open '/Users/stacktrace/.config/svgrrc'
Try this command : sudo npm install -g --unsafe-perm=true --allow-root
This worked for me: Step 1: Go->Computers->MacintoshHD->Users->{username of PC}-> Step 2: Press ('command' + 'shift' + '.') to show a hidden file on your PC. Step 3: Click on '.config' ->get info-> sharing and permission->click on the lock bar and provide your system password -> click on '+' sign -> user and guest->select your {user name} and select privileges to read and write. That's it it will definitely work. https://stackoverflow.com/questions/74637371/how-resolve-permission-denied-problem-while-launching-react-app-using-npm-start
Remarkably, for me, on Ubuntu Linux, it seems to make a difference what subsuming directory I build/run the new react app from under.
For example, if I create the new react app under /home/gino/ , I am able to build/run it fine. npm run build
py[3.10.9] gino@gino-dell:~/goodbar
(master) $ npm run build
> [email protected] build
> react-scripts build
Creating an optimized production build...
Compiled successfully.
As a test I recursively copied this goodbar directory to a different mount point.
py[3.10.9] gino@gino-dell:~/goodbar
(master) $ cd /docs/other/
py[3.10.9] gino@gino-dell:/docs/other
$ ls
py[3.10.9] gino@gino-dell:/docs/other
$ cp -a ~/goodbar .
py[3.10.9] gino@gino-dell:/docs/other
$ cd goodbar/
py[3.10.9] gino@gino-dell:/docs/other/goodbar
(master) $ npm run build
> [email protected] build
> react-scripts build
Creating an optimized production build...
Failed to compile.
Error: EACCES: permission denied, open '/.config/svgrrc'
My mount points include:
py[3.10.9] gino@gino-dell:/docs/other/goodbar
(master) $ df2
Filesystem Size Used Avail Use% Mounted on
/dev/sdb5 44G 32G 10G 77% /
/dev/sdb6 193G 65G 118G 36% /home
/dev/sda1 916G 842G 28G 97% /docs
This worked for me: Step 1: Go->Computers->MacintoshHD->Users->{username of PC}-> Step 2: Press ('command' + 'shift' + '.') to show a hidden file on your PC. Step 3: Click on '.config' ->get info-> sharing and permission->click on the lock bar and provide your system password -> click on '+' sign -> user and guest->select your {user name} and select privileges to read and write. That's it it will definitely work. https://stackoverflow.com/questions/74637371/how-resolve-permission-denied-problem-while-launching-react-app-using-npm-start
@Techboy000 You're my lifesaver! Thanks! Is this a safe way to clear such permission issues?
Hi Anyone please let me know, how to resolve this issue in ubuntu 20.04 ?
im stuck with this issue from 3 days, tried giving permission but not working.
Please find below error page, this error occurs when im starting the npm i have installed react and version is 18
I have got a different error here, which got resolved by changing the permissions of cache file under node_modules folder
Hi Anyone please let me know, how to resolve this issue in ubuntu 20.04 ?
im stuck with this issue from 3 days, tried giving permission but not working.
Please find below error page, this error occurs when im starting the npm i have installed react and version is 18
Have the same issue when running npm run build. It is easy to chmod the directory attributes.
However, anyone can tell me where to change the directory configuration, e..g, change /.config to another directory
