[react] prompt syntaxerror: unexpected token
Use react scaffold to build the project
- Install globally: npm i -g create-react-app
- create-react-app hello-react
- Go to the project folder: cd hello-react
- Start the project: npm start
When executing npm start, an error occurred, please check the node version.
- The investigation found that it was caused by the node version.
- execute node -v ;
- react-app requires node version greater than 14
- execute nvm use 14;
- Just restart.