Search code examples
javascriptnode.jsreactjsmodulenotfounderrorreact-scripts

'User' is not recognized as an internal or external command,"durring running npm start"


Please help to resolve this error, I created new react project, then I run npm start cmd, I am getting this error.

 C:\Rachna\p-16 working with Form & User Input using http request\user-input-project>npm start
    
    > user-input-project@0.1.0 start
    > react-scripts start
    
    'User' 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 'C:\Rachna\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: []

}

Solution

  • The problem is that you have a & in your path name:
    C:\Rachna\p-16 working with Form & User Input using http request\user-input-project>npm start

    Read this StackOverflow answer to know more. As a solution, stop your server and then try replacing the & in your pathname with something else, like and. After that, it should work properly.