I cloned a repo from Github. I tried to run it locally, I use npm start then I got an error on the terminal “cannot find module” although it’s in the same path and I installed npm again.
Describe the steps you took and commands you entered. And post the exact error.
Did you do npm install
?
Yes, I did. and I got some warnings like “unsupported engine” but finally it’s installed correctly “found 0 vulnerabilities”
OK. As jenovs asked, please cut and paste the exact commands and what they outputted. And post the exact error, please.
So, I cloned a repo from Github then I opened it in VScode . Then I entered the path to open it in the “Localhost 3000” like I am doing in Windows using npm start
, but it’s not working. I used npm install
and it installed correctly, but I still have the same problem.
I tried another solution by add change "start"
into dependencies to node .
But this is also not working, so I removed it.
OK. As jenovs asked, please cut and paste the exact commands and what they outputted. And post the exact error, please.
Please provide the error message(s)
Obviously there is no start
script. What’s in the package.json under the scripts
key?
Shouldn’t it be npm run start
? I can’t remember is I’m getting yarn mixed up in my head.
start, just like test, is a special command that could be run without run
.
I have two package.json
. one in the src
folder that has start
under scripts. and another one in the main folder with no start under scripts but has build
, deploy
and heroku-postbuild
.
So does that mean I have to add it manually?
Just cd into src folder and run npm start from there.
He wants to run from the src folder? I would expect it to be in the root folder, the one above src.
And if that doesn’t work, can you cut and paste the contents of the package.json file in the main folder, at least the scripts.
Also, you say that you cloned this from github - Can you provide a link?
Thank you all, I just know I have to open the one inside the source folder.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.