Reputation: 1
hello guys I want to run my app and after the "npm run dev" command I see the "MODULE_NOT_FOUND" error can anyone help me fix it my node version "v20.6.1" my npm version "10.2.5"
"PS C:\Users\DELL\Desktop\Ultimate Ecommerce Development with React & Next.js\udemy\nextecom> npm run dev
[email protected] dev next dev
'Next.js\udemy\nextecom\node_modules.bin' is not recognized as an internal or external command, operable program or batch file. node:internal/modules/cjs/loader:1051 throw err; ^
Error: Cannot find module 'C:\Users\DELL\Desktop\next\dist\bin\next' at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15) at Module._load (node:internal/modules/cjs/loader:901:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
Node.js v20.6.1"
i try to add some path in the environment variables
Upvotes: 0
Views: 872
Reputation: 246
I got the same issue. It seems related to the build. I had to delete the folder and do it again and then do npm run build
Upvotes: 0
Reputation: 41
I feel this error popped up because of how you have named your directory. Make sure there is no space character in the directory name. Change the directory name from,
Ultimate Ecommerce Development with React & Next.js
To this: Ultimate_Ecommerce_Development_with_React_&_Nextjs. You can do this by changing the folder name in file explorer.
After making this change your directory path would look like this in your terminal.
C:\Users\DELL\Desktop\Ultimate_Ecommerce_Development_with_React_&_Nextjs\udemy\nextecom
.
Hope this helps!
Upvotes: 0