Home > OS >  npm start not working in react last version
npm start not working in react last version

Time:08-31

i was working on React 17.0.2 but today i moved on to React 18.0.2 i faced a problem when using(npm start): i tried all solutions like installing react-scripts and npm i and uninstalling react modules but nothing worked

PS D:\Nageeb\Code\Laravel&React\ecommerce-frontend> npm start 
> [email protected] start
> react-scripts start
'React\ecommerce-frontend\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:936
  throw err;

Error: Cannot find module 'D:\Nageeb\Code\react-scripts\bin\react-scripts.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
PS D:\Nageeb\Code\Laravel&React\ecommerce-frontend>

CodePudding user response:

Try deleting node_modules folder and running npm i on the root folder.

CodePudding user response:

i found the solution the main folder that the project inside it contain (&) in its name i deleted it and it worked

  • Related