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

Missing script: start #843

Closed
chrisfinazzo opened this issue Oct 4, 2016 · 1 comment
Closed

Missing script: start #843

chrisfinazzo opened this issue Oct 4, 2016 · 1 comment

Comments

@chrisfinazzo
Copy link

Description

Follow up to #82, npm refuses to run start claiming that it doesn't exist. However, it is clearly in my package.json and should call react-scripts-start.

Expected behavior

The server should start and instruct me to open localhost:3000.

Actual behavior

screen shot 2016-10-04 at 12 02 24 pm

### Environment

1.screen shot 2016-10-04 at 12 11 10 pm
2. node -v: 6.7.0
3. npm -v: 3.10.7

Then, specify:

  1. Operating system: macOS 10.11.6
  2. Browser and version: Safari 10

Reproducible Demo

The repository is located here.

From the looks of it, is this a configuration error b/c of Homebrew?

@gaearon
Copy link
Contributor

gaearon commented Oct 4, 2016

In your repo, all package.json contents is under a key called author:

{
    "name": "Demo",
    "version": "0.1.0",
    "homepage": "https://github.com/chrisfinazzo/react-demo",
    "repository": {
        "type": "git",
        "url": "https://github.com/chrisfinazzo/react-demo.git"
    },
    "author": {
        "name": "Chris Finazzo",
        "url": "https://chrisfinazzo.com/",

        // none of the keys below should be inside "author"

        "private": "true",
        "devDependencies": {
            "react-scripts": "0.6.1"
        },
        "dependencies": {
            "react": "^15.3.2",
            "react-dom": "^15.3.2"
        },
        "scripts": {
            "start": "react-scripts start",
            "build": "react-scripts build",
            "test": "react-scripts test --env=jsdom",
            "eject": "react-scripts eject"
        }
    }
}

Did you edit it manually, or was it edited by some tool?

This is how it should look like instead:

{
    "name": "Demo",
    "version": "0.1.0",
    "homepage": "https://github.com/chrisfinazzo/react-demo",
    "repository": {
        "type": "git",
        "url": "https://github.com/chrisfinazzo/react-demo.git"
    },
    "author": {
        "name": "Chris Finazzo",
        "url": "https://chrisfinazzo.com/",
        "private": "true",
        "devDependencies": {
            "react-scripts": "0.6.1"
        },
    {
    "name": "Demo",
    "version": "0.1.0",
    "homepage": "https://github.com/chrisfinazzo/react-demo",
    "repository": {
        "type": "git",
        "url": "https://github.com/chrisfinazzo/react-demo.git"
    },
    "author": {
        "name": "Chris Finazzo",
        "url": "https://chrisfinazzo.com/",
    },
    "private": "true",
    "devDependencies": {
        "react-scripts": "0.6.1"
    },
    "dependencies": {
        "react": "^15.3.2",
        "react-dom": "^15.3.2"
    },
    "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test --env=jsdom",
        "eject": "react-scripts eject"
    }
}

@gaearon gaearon closed this as completed Oct 4, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants