1
votes

When I write npx create-react-app-my-app in CMD windows I'm getting an error.

I have installed Node.js:

C:\Users\dev>node --version
v15.4.0

error:

node:internal/modules/cjs/loader:928
  throw err;
  ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'

at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)

at Function.Module._load (node:internal/modules/cjs/loader:769:27)

at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)

at node:internal/main/run_main_module:17:47 {

  code: 'MODULE_NOT_FOUND',

  requireStack: []

}

node:internal/modules/cjs/loader:928

  throw err;

  ^



Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npx-cli.js'

[90m    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)[39m

[90m    at Function.Module._load (node:internal/modules/cjs/loader:769:27)[39m

[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)[39m

[90m    at node:internal/main/run_main_module:17:47[39m {

  code: [32m'MODULE_NOT_FOUND'[39m,

  requireStack: []

}
2

2 Answers

2
votes

What you need is npx create-react-app my-app. You can replace 'my-app' with what you want to name the application. Your command is currently missing the space.

0
votes

please add the command below, I hope this solves your problem: node ./src/index.js