Next.js Discord

Discord Forum

Can't start next server

Unanswered
Kingsley Ibe posted this in #help-forum
Open in Discord
Hello Everyone,

I created a next application using npx create-next-app command but I'm unable to start the server.
I get the following error each time I run npm start:

Cannot find module 'stream/web'

I have tried to the delete the node_modules file and re-install it but that didn't help.

Please how can I fix the error.

Thanks

25 Replies

no
@Kingsley Ibe no
Siamese Crocodile
If you're trying to run in dev mode, use npm run dev, otherwise, first run npm run build then npm run start
npm run build and npm run dev throw same error
Siamese Crocodile
huh that's weird
yes, It is
What is the error?
@nkilm What is the error?
Cannot find module 'stream/web'
is your code open-source?
@nkilm is your code open-source?
No, the only code I have currently is the preinstall files by npx create-next-app
Here is the error screenshot
Umm it should work, please can you share your package.json
@nkilm Umm it should work, please can you share your `package.json`
sure, here:
try downgrading next version to 13.4.8
to npm i after changing the version
Also clear npm cache - npm cache clean --force
@nkilm try downgrading next version to `13.4.8`
Okay, let me try this
@nkilm to `npm i` after changing the version
this didn't work for me
Umm strange
npm i @types/node
if you're using typescript
Okay. I'm not sure what is causing this error then. You can retry the same process in another drive.
Alright, thanks