Score:0

I can no longer initialize a React project

jo flag

For a long time now, it has been impossible for me to initialize a react project, or even to initialize a project with npm because of multiple errors that I cannot resolve. Initially, it started from my versions of npm and node js that I had to update. I uninstalled create-react-app globally and then I reinstalled it. But when I launch the creation of a react project with create react app I have the following errors

glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
} 
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /root/.npm/_cacache/tmp
npm ERR! errno -13
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due   to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 1000:1000 "/root/.npm"

Creating a new React app in /home/tiffane/Documents/Visi/client.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /root/.npm/_cacache/tmp
npm ERR! errno EACCES
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 1000:1000 "/root/.npm"

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-       template has failed.

Deleting generated file... package.json
Deleting client/ from /home/tiffane/Documents/Visi
Done.

after reading the errors obtained I performed an npm cache clean --force history to clean things up, I tried to initialize react in root mode, I entered the command sudo chown -R 1000: 1000 "/ root /.npm "as indicated, but nothing to do I still can not initialize my project react

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.