i recently changed my hard drive partitions and merged them into one partition now when i am trying to starting react from npm start its giving some error so i have uninstalled and reinstalled node js multiple times like 4 times but nothing worked ,
i have created a new react-redux project with npx create-react-app react-redux
here is my command line responses
PS D:\games&software\software\installed\web-development-folder\www\02\react\react-redux> npm start
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> [email protected] start
> react-scripts start
'software\software\installed\web-development-folder\www\02\react\react-redux\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:\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:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
PS D:\games&software\software\installed\web-development-folder\www\02\react\react-redux>
one strange thing i have noticed is it is checking for modules in 'D:\react-scripts\bin\react-scripts.js'
but my project directory is D:\games&software\software\installed\web-development-folder\www\02\react\react-redux
i feel like this is the main culprit but not sure , after doing too much research i have came for help so please if anyone know what can i do to solve this help me please .
CodePudding user response:
you can try npm i
to reinstall all the node_modules that you use. One option could be that they weren't installed properly.
CodePudding user response:
this is totally unexpected error that the &
sign was interferring with the url parsing as soon as i have moved my project out of that directory it worked
you can see in the error it was starting the url from 'software\software\installed\web-development-folder\www\02\react\react-redux\node_modules.bin'
but the root folder name is games&software
thanks for other answers and i have posted this if someone come to this situation it might help