Error: Cannot find module 'C:\Users\my pc\OneDrive\Desktop\react-scripts\bin\react-scripts.js' , code: 'MODULE_NOT_FOUND',

673 Views Asked by At

'create' is not recognized as an internal or external command, operable program or batch file. node:internal/modules/cjs/loader:1080 throw err; ^

Error: Cannot find module 'C:\Users\my pc\OneDrive\Desktop\react-scripts\bin\react-scripts.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Module._load (node:internal/modules/cjs/loader:922:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v18.18.0

when you find this type of error in case of npm start you just need to do one thing rather than confusing with lots of resolving method , you need to do is ,,,,,

Verify Node.js and npm Versions,Use a Compatible Shell,Install Create React App Globally (if not installed),Check Environment Variables,Delete node_modules and package-lock.json,Clear npm Cache,Reinstall Dependencies,Check package.json Scripts,Run npm start

1

There are 1 best solutions below

0
fathima akeela On

Sometimes, having spaces in the file path can cause issues. Try moving your project to a directory with a path that doesn't contain spaces, such as C:\dev\my-react-app. Then, navigate to the new project directory in your terminal and try running npm start again.

it worked for me.if some beginners getting trouble on this.i hope this will give you some hint.

thank you