Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No content provided #8644

Closed
dreamchasersuon opened this issue Mar 12, 2020 · 6 comments
Closed

No content provided #8644

dreamchasersuon opened this issue Mar 12, 2020 · 6 comments

Comments

@dreamchasersuon
Copy link

Situation

Hi, guys!

Just tried to init new app using this command npx create-react-app my-app.
Everything is done well, but look at this:
Снимок экрана 2020-03-12 в 21 48 31

Few weeks ago everything goes right. Install --> cd to-my-app --> yarn/npm start --> woohoo.

Now I can't do anything. I see this message command not found with this project files:
Снимок экрана 2020-03-12 в 21 50 49

Question

What's going on? Am I missing something, or this is a bug?

@dreamchasersuon
Copy link
Author

dreamchasersuon commented Mar 12, 2020

BTW: npm -v = 6.13.7
It's work using yarn create react-app my-app.

@w3bdesign
Copy link

w3bdesign commented Mar 12, 2020

@dreamchasersuon
This is possibly because you have a global installation of CRA that conflicts with npx.

Try

npm uninstall -g create-react-app

and then do a

npx create-react-app my-app

Also, the yarn error is because package.json is missing the start section in scripts. See below for an example:

"scripts": {
  "start": "some command to be run", // you need to add this line
  "test": "(eslint lib || true) && jest"
}

@kuccello
Copy link

I can confirm that even without any global install of create-react-app the NPX call is failing to create an actual react application

Node 12.6.0

npx create-react-app experimental-webclient
Screen Shot 2020-03-12 at 12 48 27 PM

Contents of package.json are

{
  "name": "experimental-webclient",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.13.0",
    "react-dom": "^16.13.0",
    "react-scripts": "3.4.0"
  }
}

@w3bdesign
Copy link

It is possible that there is an issue with the npm cache.

Try something like

npm cache clean --force
npm cache verify

Also check out https://docs.npmjs.com/cli/cache.html to read up on the npm cache commands.

@ayushinigam
Copy link

@dreamchasersuon I was able to replicate the issue
It was happening for me as I had an older version of create-react-app installed globally.
Uninstalling the global package might solve the issue:

npm uninstall -g create-react-app
or
rm -rf /usr/local/bin/create-react-app

@dreamchasersuon
Copy link
Author

@dreamchasersuon I was able to replicate the issue
It was happening for me as I had an older version of create-react-app installed globally.
Uninstalling the global package might solve the issue:

npm uninstall -g create-react-app
or
rm -rf /usr/local/bin/create-react-app

@dreamchasersuon
This is possibly because you have a global installation of CRA that conflicts with npx.

Try

npm uninstall -g create-react-app

and then do a

npx create-react-app my-app

Also, the yarn error is because package.json is missing the start section in scripts. See below for an example:

"scripts": {
  "start": "some command to be run", // you need to add this line
  "test": "(eslint lib || true) && jest"
}

I can confirm that uninstalling create-react-app globally fixes this issue with npx. Thank you, guys!
Just wondering why it worked before.

@lock lock bot locked and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants