Skip to content

No content provided #8644

Closed
Closed

Description

@dreamchasersuon

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?

Activity

  1. dreamchasersuon commented on Mar 12, 2020

    @dreamchasersuon
    Author

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

  2. w3bdesign commented on Mar 12, 2020

    @w3bdesign

    @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"
    }
    
  3. kuccello commented on Mar 12, 2020

    @kuccello

    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"
      }
    }
  4. w3bdesign commented on Mar 12, 2020

    @w3bdesign

    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.

  5. ayushinigam commented on Mar 13, 2020

    @ayushinigam

    @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

  6. dreamchasersuon commented on Mar 13, 2020

    @dreamchasersuon
    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.

  7. locked and limited conversation to collaborators on Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions