academind / react-complete-guide-course-resources

React - The Complete Guide Course Resources (Code, Attachments, Slides)
1.65k stars 1.37k forks source link

Error Running NPM Run Dev #36

Open kjohnson2021 opened 2 months ago

kjohnson2021 commented 2 months ago

after running npm install, then trying to execute npm run dev, I get the following error in my Mac terminal window:

SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:122:18) at async link (internal/modules/esm/module_job.js:42:21) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-essentials-start@0.0.0 dev: vite npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-essentials-start@0.0.0 dev script.

ilseojeon commented 1 week ago

after running npm install, then trying to execute npm run dev, I get the following error in my Mac terminal window:

SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:122:18) at async link (internal/modules/esm/module_job.js:42:21) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-essentials-start@0.0.0 dev: vite npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-essentials-start@0.0.0 dev script.

Hey, I resolved this error by updating node to 20.x

Refer command lines here : https://github.com/nodesource/distributions