Search code examples
node.jsnext.jsnpm-installnpm-start

Error: Cannot find module 'D:\next\dist\bin\next' when running npm run dev on a Next project


Trying to setup my dev environment on a new PC and I get this error when running npm run dev

enter image description here

Been trying to search for an answer for an hour now but can't find a solution.

I've tried deleting node-modules and package-lock.json and running npm install again. It didn't work.

Node version is v18.4.0

Any ideas?


Solution

  • Ok, I figured it out. The problem was the folder name "Will & Skill". Changing it to "WillAndSkill" makes it work.