Npm start did not work after clone from github

$ npm start
npm ERR! Missing script: “start”
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run

npm ERR! A complete log of this run can be found in: C:\Users\derek\AppData\Local\npm-cache_logs\2024-05-03T09_28_40_816Z-debug-0.log

Above is error shown by terminal.

did you do npm install first?

yes, I’m doing npm install first then it shown “found 0 vulnerabilities”, after that I’m typing npm start. Then it throw the error message.

Hello,

looks like you forgot to cd into .\day001\counter-game where the json file is located. The terminal shows you are still in the root file!

Hi, thank you for the remind. but unfortunately, still not working after cd into it. What I do is after cd into it then I type npm install > npm start. The program did not run as expected.

Try deleting the package-lock.json file and the node_modules folder and then install the dependencies again npm i

Hi, I have deleted both. and install back dependencies. Then the package-lock and node_modules auto reinstall back…

this is running terminal after deleted both, and npm i then the node_modules will reinstall back

Hi, I have successful run the development server. A bit weird when I type npm cache clean > npm install > npm cache verify > npm i.


Thank you.


Anyone can explain what is the actual issues that did not work before. Thanks.

Great you solved it!

It’s hard to find the true reasons from remote, but you might have had an old version of Node installed on your machine and upgraded it during your fix.
Some of the error messages are pointing to this problem.

1 Like

Yes, I’m thinking the same maybe is the version prob. Btw, thank you for letting me know. Appreciated.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.