Naseef Ali
Naseef Ali

Reputation: 69

EACCESS Permission error while creating react app in Mac OS X

I'm getting the following warning while creating the react app, and after creating the project, I'm unable to add js file to the src folder I'm getting EACCESS in vscode

naseefali@NASEEFs-MacBook-Pro react % sudo create-react-app react-erp

Creating a new React app in /Users/naseefali/react/react-erp.

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

[email protected] install /Users/naseefali/react/react-erp/node_modules/watchpack-chokidar2/node_modules/fsevents node install.js

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/naseefali/react/react-erp/node_modules/watchpack-chokidar2/node_modules/fsevents/build' gyp ERR! System Darwin 19.4.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/naseefali/react/react-erp/node_modules/watchpack-chokidar2/node_modules/fsevents gyp ERR! node -v v14.16.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok

[email protected] install /Users/naseefali/react/react-erp/node_modules/webpack-dev-server/node_modules/fsevents node install.js

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/naseefali/react/react-erp/node_modules/webpack-dev-server/node_modules/fsevents/build' gyp ERR! System Darwin 19.4.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/naseefali/react/react-erp/node_modules/webpack-dev-server/node_modules/fsevents gyp ERR! node -v v14.16.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok

Upvotes: 0

Views: 1621

Answers (1)

Lean Junio
Lean Junio

Reputation: 86

Are you just trying to run create-react-app? You probably don't need the sudo no? If you have node installed, you can just run npx create-react-app my-app

Upvotes: 2

Related Questions