Hello All, I am getting an error when trying to install create-react-app locally. I also tried to locate the file to change the permissions on it but I cant seem to find it. Any help is appreciated thanks.
You could try using
sudo to elevate the permissions of the command. Not sure if that would fix it for you on your Mac.
However, instead of doing that, you could try the newer recommended way of using create-react-app. They no longer suggest you install it globally with npm. Instead, try the following:
npx create-react-app appnamehere
This will download the latest create-react-app and create a new React project in the folder specified.
Your version of node is new enough to use that method. Most likely your version of npm is new enough too.
Interesting Thanks for the advice @selectall. I guess I thought the recommended way was to have a local install. But being able to pull the latest version every-time you create an application makes complete sense.
For what its worth I did go and try sudo command just to see if it would work. It did work thanks for that tip. I forgot all about the sudo command.
That’s good to know it works like that on a Mac too, even if you didn’t ultimately use it in this case.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.