skip to Main Content

I’m trying to get started with react & typescript . After creating an empty folder in vscode then I create a TypeScript app with npx create-react-app react-script-demo --template typescript the installating completed . but after running npm start . I got theese errors :

‘typescriptreact-script-demonode_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 ‘C:*******react-scriptsbinreact-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: [] }

I checked other question in stackoverflow but none of them worked for me

2

Answers


  1. Chosen as BEST ANSWER

    this error has nothing to do with the installation. I figured out that the error is coming from the name of the parent folder containing an & (Ampersand) . renaming this folder with no & symbol solved the problem


  2. You have to run npm install within the repo’s directory first.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search