I'm just created a react project using NPM with the npx create-react-app . Afterward, I tried starting the development server and got an error message.
I have tried looking at the error code and log but I am not sure what to do.
The terminal error message is
/Users/selina/Desktop/reactv2/node_modules/chokidar/lib/fsevents-handler.js:28 return (new fsevents(path)).on('fervent', callback).start();
TypeError: fsevents is not a constructor
This may be due to root permission. I had the same issue in MacOS and i solved by sudo npm cache clean --force sudo npm uninstall sudo npm install
Hope this helps.. do it with root user
npx depends on specific npm version there could be some issue in these number mismatch
you can try with npm init
npm init create-app myfirtsproject
cd myfirtsproject
npm start or yarn start
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.