3

I'm very new and I'm trying to stick to the steps followed by an instructor in Coursera. And I get an error after doing several steps and trying to run lite-server with npm run dev command in CMD:

C:\Users\Spifet\Documents\guia-hoteles>npm run dev
npm ERR! code EJSONPARSE
npm ERR! path C:\Users\Spifet\Documents\guia-hoteles/package.json
npm ERR! JSON.parse Unexpected string in JSON at position 5096 while parsing '{
npm ERR! JSON.parse   "devDependencies": {
npm ERR! JSON.parse     "lite-serve'
npm ERR! JSON.parse Failed to parse JSON data.
npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Spifet\AppData\Local\npm-cache\_logs\2020-11-01T03_21_13_999Z-debug.log

This is how my package.json currently looks like:

{
  "devDependencies": {
    "lite-server": "^2.5.4"
  },
  "name": "guia-hoteles",
  "version": "1.0.0",
  "main": "index.js",
  "dependencies": {
    "after": "^0.8.2",
    "arraybuffer.slice": "^0.0.7",
    "accepts": "^1.3.7",
    "anymatch": "^3.1.1",
    "async": "^1.5.2",
    "async-each-series": "^0.1.1",
    "ansi-regex": "^2.1.1",
    "backo2": "^1.0.2",
    "async-limiter": "^1.0.1",
    "ansi-styles": "^2.2.1",
    "base64id": "^1.0.0",
    "batch": "^0.6.1",
    "better-assert": "^1.0.2",
    "balanced-match": "^1.0.0",
    "binary-extensions": "^2.1.0",
    "axios": "^0.19.0",
    "blob": "^0.0.5",
    "brace-expansion": "^1.1.11",
    "base64-arraybuffer": "^0.1.5",
    "braces": "^3.0.2",
    "browser-sync": "^2.26.13",
    "browser-sync-client": "^2.26.13",
    "browser-sync-ui": "^2.26.13",
    "bs-recipes": "^1.3.4",
    "callsite": "^1.0.0",
    "camelcase": "^5.3.1",
    "bytes": "^3.1.0",
    "bs-snippet-injector": "^2.0.1",
    "color-name": "^1.1.3",
    "cliui": "^6.0.0",
    "color-convert": "^1.9.3",
    "component-bind": "^1.0.0",
    "component-inherit": "^0.0.3",
    "commander": "^2.20.3",
    "component-emitter": "^1.3.0",
    "chokidar": "^3.4.3",
    "concat-map": "^0.0.1",
    "connect": "^3.6.6",
    "connect-logger": "^0.0.1",
    "cookie": "^0.3.1",
    "debug": "^2.6.9",
    "depd": "^1.1.2",
    "connect-history-api-fallback": "^1.6.0",
    "dev-ip": "^1.0.1",
    "destroy": "^1.0.4",
    "chalk": "^1.1.3",
    "decamelize": "^1.2.0",
    "dlv": "^1.1.3",
    "eazy-logger": "^3.1.0",
    "emoji-regex": "^8.0.0",
    "ee-first": "^1.1.1",
    "escape-html": "^1.0.3",
    "easy-extender": "^2.3.4",
    "engine.io": "^3.2.1",
    "escape-string-regexp": "^1.0.5",
    "engine.io-client": "^3.4.4",
    "etag": "^1.8.1",
    "encodeurl": "^1.0.2",
    "finalhandler": "^1.1.0",
    "engine.io-parser": "^2.1.3",
    "fill-range": "^7.0.1",
    "fresh": "^0.5.2",
    "eventemitter3": "^4.0.7",
    "follow-redirects": "^1.13.0",
    "get-caller-file": "^2.0.5",
    "find-up": "^4.1.0",
    "glob-parent": "^5.1.1",
    "fsevents": "^2.1.3",
    "has-ansi": "^2.0.0",
    "has-binary2": "^1.0.3",
    "fs-extra": "^3.0.1",
    "graceful-fs": "^4.2.4",
    "immutable": "^3.8.2",
    "http-proxy": "^1.18.1",
    "iconv-lite": "^0.4.24",
    "indexof": "^0.0.1",
    "inherits": "^2.0.4",
    "is-binary-path": "^2.1.0",
    "http-errors": "^1.7.3",
    "is-extglob": "^2.1.1",
    "is-number": "^7.0.0",
    "is-buffer": "^2.0.4",
    "is-glob": "^4.0.1",
    "is-fullwidth-code-point": "^3.0.0",
    "has-cors": "^1.1.0",
    "is-number-like": "^1.0.8",
    "is-wsl": "^1.1.0",
    "jsonfile": "^3.0.1",
    "locate-path": "^5.0.0",
    "limiter": "^1.1.5",
    "localtunnel": "^2.0.0",
    "lodash.isfinite": "^3.3.2",
    "mime": "^1.4.1",
    "mime-db": "^1.44.0",
    "micromatch": "^4.0.2",
    "isarray": "^2.0.1",
    "minimatch": "^3.0.4",
    "mime-types": "^2.1.27",
    "mitt": "^1.2.0",
    "object-component": "^0.0.3",
    "ms": "^2.0.0",
    "normalize-path": "^3.0.0",
    "openurl": "^1.1.1",
    "on-finished": "^2.3.0",
    "negotiator": "^0.6.2",
    "opn": "^5.3.0",
    "p-locate": "^4.1.0",
    "parseqs": "^0.0.6",
    "parseuri": "^0.0.6",
    "parseurl": "^1.3.3",
    "p-try": "^2.2.0",
    "p-limit": "^2.3.0",
    "picomatch": "^2.2.2",
    "path-exists": "^4.0.0",
    "minimist": "^1.2.0",
    "qs": "^6.2.3",
    "portscanner": "^2.1.1",
    "range-parser": "^1.2.1",
    "readdirp": "^3.5.0",
    "raw-body": "^2.4.1",
    "resp-modifier": "^6.0.2",
    "requires-port": "^1.0.0",
    "require-main-filename": "^2.0.0",
    "rx": "^4.1.0",
    "require-directory": "^2.1.1",
    "rxjs": "^5.5.12",
    "serve-index": "^1.9.1",
    "safer-buffer": "^2.1.2",
    "send": "^0.16.2",
    "serve-static": "^1.13.2",
    "server-destroy": "^1.0.1",
    "safe-buffer": "^5.1.2",
    "socket.io-adapter": "^1.1.2",
    "socket.io": "^2.1.1",
    "socket.io-parser": "^3.2.0",
    "setprototypeof": "^1.1.1",
    "statuses": "^1.3.1",
    "strip-ansi": "^3.0.1",
    "stream-throttle": "^0.1.3",
    "socket.io-client": "^2.3.1",
    "supports-color": "^2.0.0",
    "symbol-observable": "^1.0.1",
    "string-width": "^4.2.0",
    "set-blocking": "^2.0.0",
    "toidentifier": "^1.0.0",
    "to-regex-range": "^5.0.1",
    "tfunk": "^4.0.0",
    "to-array": "^0.1.4",
    "unpipe": "^1.0.0",
    "ua-parser-js": "^0.7.22",
    "universalify": "^0.1.2",
    "ultron": "^1.1.1",
    "utils-merge": "^1.0.1",
    "which-module": "^2.0.0",
    "wrap-ansi": "^6.2.0",
    "ws": "^3.3.3",
    "yargs-parser": "^18.1.3",
    "y18n": "^4.0.0",
    "yeast": "^0.1.2",
    "lodash": "^4.17.20",
    "xmlhttprequest-ssl": "^1.5.5",
    "moment": "^2.29.1",
    "yargs": "^15.4.1"
  },
  "scripts": {
    "dev" : "lite-server",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://Spifet@bitbucket.org/Spifet/guia-hoteles.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "homepage": "https://bitbucket.org/Spifet/guia-hoteles"
  "description": ""
}

Could anyone please tell me how to fix it?

Thanks in advance!

Spifet
  • 31
  • 1
  • 2
  • 4
    you have error in your json file look at homepage you forgot to add comma after value.. "homepage": "value" – ash Nov 01 '20 at 03:43
  • Thanks, Ash! I do not know how I missed that, probably inexperience. – Spifet Nov 01 '20 at 12:13

0 Answers0