D
D
Dmitry2020-07-09 14:39:08
Node.js
Dmitry, 2020-07-09 14:39:08

Why do I get Cannot GET / instead of the site when I run npm run start?

Good afternoon. I watched a video by Vadim Makeev and decided to reproduce the assembly at home. But when I run the "npm start" command, instead of the site at localhost:3000 I get Cannot GET / . The sources are identical to the sources from the video.

{
  "private": true,
  "scripts": {
    "start": "browser-sync start --server 'src' --no-notify --no-ui --cwd 'src' --files 'index.html,styles/**/*'",
    "test": "editorconfig-checker",
    "html": "html-minifier --remove-comments --collapse-whitespace --input-dir src --output-dir docs --file-ext html",
    "styles": "postcss src/styles/index.css --use postcss-import --use postcss-csso --no-map --output docs/styles/index.css",
    "build": "npm run html && npm run styles",
    "deploy": "cd docs && rsync --archive --compress --delete . [email protected]:/var/www/pepelsbey.dev/html/"
  },
  "devDependencies": {
    "browser-sync": "^2.26.7",
    "editorconfig-checker": "^3.1.0",
    "html-minifier": "^4.0.0",
    "postcss-cli": "^7.1.1",
    "postcss-csso": "^4.0.0",
    "postcss-import": "^12.0.1"
  }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lynatik001, 2020-07-09
@Lynatik001

try to write not npm run start but npm start or npm run

G
grinat, 2020-07-10
@grinat

Is there static? The path to static is wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question