I have Create-react-app version 1.4.3
installed. When I try to create a new App , I get the following messages in the command prompt. Please help me find and fix the issue.
C:\Users\GSI-KOL\Desktop\server>create-react-app client
Creating a new React app in C:\Users\GSI-KOL\Desktop\server\client.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
[email protected] postinstall C:\Users\GSI-KOL\Desktop\server\client\node_modules\uglifyjs-webpack-plugin
node lib/post_install.js
npm ERR! path C:\Users\GSI-KOL\Desktop\server\client\node_modules\fsevents\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'C:\Users\GSI-KOL\Desktop\server\client\node_modules\fsevents\node_modules'
npm ERR! { Error: EPERM: operation not permitted, lstat 'C:\Users\GSI-KOL\Desktop\server\client\node_modules\fsevents\node_modules'
npm ERR! stack: 'Error: EPERM: operation not permitted, lstat \'C:\\Users\\GSI-KOL\\Desktop\\server\\client\\node_modules\\fsevents\\node_modules\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path: 'C:\\Users\\GSI-KOL\\Desktop\\server\\client\\node_modules\\fsevents\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\GSI-KOL\AppData\Roaming\npm-cache\_logs\2017-11-08T13_08_03_705Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting client / from C:\Users\GSI-KOL\Desktop\server
Done.
C:\Users\GSI-KOL\Desktop\server>
If you really need create-react-app , you might need to reinstall Node and reconfigure your dependencies to ensure you have a fresh start with Node, npm, npx, and the like.
If you've previously installed create-react-app globally via npm install -g create-react-app , we recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version.
The other method is also straightforward, you can check the React app version by heading over to node_modules/react/cjs/react. development. js. You can see the react project version in the commented section as showing given below.
I was faced this same problem . It is due to the issue with npm .
please run the following command in command Line
npm cache clean --force
then run
create-react-app <project Name>
If your problem still exist then switch from npm to yarn
run the following commands, it solved my problem
npm install -g yarn yarn global add create-react-app create-react-app <projectname>
It looks like you need admin privileges to write some of the generated files. Can you create a terminal instance with administrator rights then reissue the command?
You probably had "create-react-app" running before, which was the problem in my case anyway. The way I solved this was using
npm cache clean --force
and ran create-react-app my-app
again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With