Leo
Leo

Reputation: 21

create-react-app does not work

i am trying to start with a react project and i installed create-react-app with npm. When i do the command create-react-app pseudogram i get the following error:

Aborting installation.
Unexpected error. Please report it as a bug:
{ Error: Cannot find module 'C:\Users\leonel\Desktop\pseudogram\node_modules\react-scripts\package.json'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at checkNodeVersion (C:\Users\leonel\AppData\Roaming\npm\node_modules\create-react-app\createReactApp.js:476:23)
    at getPackageName.then.then.then.packageName (C:\Users\leonel\AppData\Roaming\npm\node_modules\create-react-app\createReactApp.js:283:7)
    at process._tickCallback (internal/process/next_tick.js:109:7) code: 'MODULE_NOT_FOUND' }

I tried with different versions of node and npm and still does not work.

Thanks in advance

Upvotes: 0

Views: 3326

Answers (1)

Vladimir Jovanović
Vladimir Jovanović

Reputation: 5551

$ npm i -g create-react-app . Install it globally.

After that, in your terminal, type $ create-react-app name-of-the-app , then $ cd name-of-the-app and finally $ npm start.

The documentation will print automatically after it finishes installing.

Upvotes: 3

Related Questions