Closed hellomikko closed 3 years ago
That's why there is a package.json
.
When a developer runs npm install
it will install all dependencies locally (unless NODE_ENV=production), so no need to install NextJS seperately.
Unless I'm missing something here?
For me, when I ran npm run dev
nothing happens and gave me an error as if some dependencies weren't there or installed. But when I ran npm install
and than ran npm run dev
it worked like a charm. I dunno, that's just how it was for me once I did a fresh clone AND downloaded it separately just to see.
For me, when I ran
npm run dev
nothing happens and gave me an error as if some dependencies weren't there or installed. But when I rannpm install
and than rannpm run dev
it worked like a charm. I dunno, that's just how it was for me once I did a fresh clone AND downloaded it separately just to see.
When you want to run a Node project (like this one) locally, you always have run npm install
first to download all the necessary dependencies listed in package.json
.
I have tested it and works like a charm without needing to install NextJS separately.
alright
If the end user does not have nextjs installed before running the project:
npm install next
ornpm update next
<--- Most likely, you should just be able to instead of installing as it should already be installed.Then
run
npm run dev
and you should be set to go with the following messegeready - started server on 0.0.0.0:3000, url: http://localhost:3000
. You can also just hold ctrl+left click the url:http://localhost:3000
which will open up in a tab in your browser.