0

I just bought a new laptop, installed necessary apps, new ssh key, and am now ready to continue working on my react app. Only I keep getting this error:

"App Name" is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:988
  throw err;
  ^

Error: Cannot find module 'C:\Users\ ... \react-scripts\bin\react-scripts.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
    at Function.Module._load (node:internal/modules/cjs/loader:833:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

I've deleted node modules/package-lock.json and reinstalled packages but still this error. Is there something else I need to setup on my new computer that I'm missing? I've also tried solutions that worked for others with similar issues. I appreciate all feedback. Thank you.

  • Hi, welcome. What command are you running? Is it an NPM script? If so what does your `package.json` look like? – brettinternet May 18 '23 at 21:46
  • Yes, npm. "start": "react-scripts start", – ampatte May 18 '23 at 23:24
  • here are all the scripts `"scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" },` – ampatte May 18 '23 at 23:41
  • I think we'd need more context or information about the project to find the cause of the issue. Have you seen https://stackoverflow.com/q/47928735? Is it possible you're not installing the node modules or running the command in the correct directory? – brettinternet May 19 '23 at 05:02

0 Answers0