I tried to start my application with “npm run dev” as it is a react / next.js app. The console gave me an error sh: next: command not found. I deleted the node_modues folder and installed it again, even then I still get this error sh: next: command not found.
I can not remeber that I changed something, so I am curious why this error appears. Can someone can help me here?
What I need to do to run my application with npm run dev?
This is the error message I get when I try to start the server from npm scripts:
> Executing task: npm run dev <
> dev
> next dev
sh: next: command not found
The terminal process "/bin/zsh '-c', 'npm run dev'" terminated with exit code: 127.
Terminal will be reused by tasks, press any key to close it.
This is a Next JS boilerplate I made a few weeks before, now it is not running the command npm run dev anymore. I also habe some issues with webpack, is it possible that it has something to do with that?
I wonder why there is sh: and next: this is not common i guess…
Maybe it has something to do with the terminal? I am not sure what exactly a shell is, but I think it could be possible that something with the terminal command is not working, because I did not change anything within the project and before it was working.
I’m pretty sure the bundle folder doesn’t belong in a create-next-app. If you create a new project using create-next-app and just run npm run dev what happens?
I haven’t really used Zsh much. Do you have another terminal you can try instead?
If you click the down-arrow next to the plus sign you should (maybe) have other terminal options (just to test it).
I tried it with bash (another terminal), but it was not working eather. I am running out of energy now and need to make a break. I try to create a new project tomorrow and if ir is not working I can also create a repo because I dont have any idea whats the issue here right now…