During installing
reactjs
, the following error occurred. Please help me.enter image description here
I thought there was a problem after installing it at first, so I was going to delete it and reinstall it, but it didn’t erase well. As I tried to download it again in that situation, I had a problem and it led to the same result as now. What should I do in this situation?
3
Answers
Permission denied.
what’s your commnad?
are you using ‘-g’ ?
please use
before you install with -g
it will allows you to get the permission
If you are on Windows, did you try your command line tool in admin mode to execute
npm i -g create-react-app
?Admin mode allows the permission to create files on protected folders and it can avoid any permission issues.
If your npm version is 5.2+, you can execute Node packages without
-g
which means you do not need global package clogging.Furthermore, if you use
npx
that means you are using the latest version ofcreate-react-app
no manual upgrades needed.For your reference:
How to create a React app directly in the current folder
https://create-react-app.dev/docs/getting-started/