0

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

2
  • Could be that you didnt run npm install Commented Oct 25, 2017 at 15:12
  • i did run npm install Commented Oct 25, 2017 at 15:31

1 Answer 1

3

$ 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.

Sign up to request clarification or add additional context in comments.

5 Comments

i installed it globally, and the create-react-app starts to run and give me this: create-react-app pseudogram Creating a new React app in C:\Users\leonel\Desktop\pseudogram. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts... C:\Users\leonel\Desktop\Projects +-- [email protected] +-- [email protected] -- [email protected] -- [email protected] -- [email protected] +-- [email protected] deduped -- [email protected] deduped
when i first do create-react-app name-of-the-app it does not create any folder or project. Deleting generated file... package.json Deleting pseudogram / from C:\Users\leonel\Desktop Done.
If you are on Windows, try to run it as PowerShell Admin, if you're on Linux then try with sudo create-react-app pseudogram . I can't think of anything else, since the module is working properly. You are doing something wrong.
nop.. i tried everything. i open an issue with react team and they said it must be a problem with npm, a bug in their package manager.
Then try this. npm i -g [email protected] , npm i -g create-react-app , create-react-app pseudogram , cd pseudogram , npm start. I'm out of options. But know that create-react-app works perfectly fine on latest version of npm. Or if npm isn't working for you, you can try to install it via yarn.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.