I’ve been trying to run the frontend of the project I’ve been working on since it was left to me by a former coworker, I installed node as the README he left suggested but other than saying "npm run dev" and "go to localhost:3000" there isn’t any other info.
These are the logs I’m getting after inputting "npm run dev" and "npm run pidelo-app@0.1.0 dev" as the console suggested. Am I missing a dependency? or is the script missing altogether? I don’t have much experience with JS so this might be a common issue.
(base) Grims-Macbook:Frontend grimidk$ npm run dev
> pidelo-app@0.1.0 dev
> next dev
sh: next: command not found
(base) Grims-Macbook:Frontend grimidk$ npm run pidelo-app@0.1.0 dev
npm ERR! Missing script: "pidelo-app@0.1.0"
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: /Users/grimidk/.npm/_logs/2023-12-22T15_26_08_439Z-debug-0.log
>Solution :
Maybe You haven’t installed the dependencies,
try running this in terminal –
npm install
It will install all dependencies required from the package.json
and after then use –
npm run dev
[Make sure you are in the same folder as your app]
Localhost 3000 is not necessary, after running the previous script you will get the info of where exactly your server is running and you can just go to
http://localhost:{PORT_NUMBER}
If all this still does not work, try installing Node.js again in your terminal by going to this website – https://nodejs.org/en
It is also possible that your code editor does not have permission to run commands so just open your PC Command prompt and go to the location and try again.
Hope It helps!