Can't start next server
Unanswered
Kingsley Ibe posted this in #help-forum
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
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
@Kingsley Ibe 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
Siamese Crocodile
Did you build it before starting it?
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.jsontry downgrading next version to
13.4.8to
npm i after changing the versionAlso 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/nodeif you're using typescript
@nkilm https://stackoverflow.com/questions/73132617/nestjs-elasticsearch-stream-web-module-error
Thanks for sharing, I'm not using typescript
Okay. I'm not sure what is causing this error then. You can retry the same process in another drive.
Alright, thanks