-1

OS: Windows 10 Editor: VS Code Package Manager: Node js Bash: Cygwin Webserver: NginX

When i try to start my single page application, i get the following Error Message:

npm ERR! missing script: start

here is my package.json:

  "name": "wztv",
  "version": "1.0.0",
  "description": "",
  "main": "lib_bundle.js",
  "bin": {
    "wztv": "moc.js"
  },
  "dependencies": {
    "babel-core": "^6.26.3",
    "babel-plugin-transform-react-jsx": "^6.24.1",
    "babel-preset-env": "^1.7.0",
    "browserify": "^16.2.3",
    "history": "^4.9.0",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-router-dom": "^5.0.1",
    "uglify-js": "^3.6.0",
    "uglifycss": "0.0.29"
  },
  "devDependencies": {
    "@babel/core": "^7.4.5",
    "@babel/preset-env": "^7.4.5"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

AND here is my launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "firefox",
            "request": "launch",
            "reAttach": true,
            "name": "Launch index.html",
            "file": "${workspaceFolder}/index.html"
        },
        {
            "type": "firefox",
            "request": "launch",
            "reAttach": true,
            "name": "Launch index.html",
            "file": "${workspaceFolder}/main.jsx"
        },
    ]
}

I just want to start debugging on a localhost. Another way would be debugging via google chrome but this also does not work for me. I hope someone can help me with this.

Emile Bergeron
  • 17,074
  • 5
  • 83
  • 129
FortyTwo
  • 1
  • 2
  • Does this answer your question? [Start script missing error when running npm start](https://stackoverflow.com/questions/31976722/start-script-missing-error-when-running-npm-start) – Emile Bergeron Dec 16 '19 at 15:07

1 Answers1

1
"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

Add this to scripts in package.json

kooskoos
  • 4,622
  • 1
  • 12
  • 29