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

JSON parse error on running gh-pages lifecycle #182

Open
ruaanvds opened this issue Feb 4, 2019 · 1 comment
Open

JSON parse error on running gh-pages lifecycle #182

ruaanvds opened this issue Feb 4, 2019 · 1 comment
Labels

Comments

@ruaanvds
Copy link
Contributor

ruaanvds commented Feb 4, 2019

An error reported via email:

"This is new project, I copied my docs folder from old project to start with. Running “npm run gh-pages” is throwing son parsing error below. Json (attached) looks fine though.

Could you please let me know if I am missing something?"

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/9.10.1/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'gh-pages' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: Failed to parse json
4 verbose stack Unexpected string in JSON at position 944 while parsing '{
4 verbose stack   "name": "presidium-template",
4 verbose stack   "ver'
4 verbose stack     at parseError (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:436:11)
4 verbose stack     at parseJson (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:104:26)
4 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:51:5
4 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
4 verbose stack     at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:532:3)
5 verbose cwd /Users/skhadkekar/GitHub/testdata-tools/docs
6 verbose Darwin 17.3.0
7 verbose argv "/usr/local/Cellar/node/9.10.1/bin/node" "/usr/local/bin/npm" "run" "gh-pages"
8 verbose node v9.10.1
9 verbose npm  v5.6.0
10 error file /Users/skhadkekar/GitHub/testdata-tools/docs/package.json
11 error code EJSONPARSE
12 error Failed to parse json
12 error Unexpected string in JSON at position 944 while parsing '{
12 error   "name": "presidium-template",
12 error   "ver'
13 error File: /Users/skhadkekar/GitHub/testdata-tools/docs/package.json
14 error Failed to parse package.json data.
14 error package.json must be actual JSON, not just JavaScript.
14 error
14 error Tell the package author to fix their package.json file. JSON.parse
15 verbose exit [ 1, true ]
@ruaanvds ruaanvds added the bug label Feb 4, 2019
@ruaanvds ruaanvds added this to Backlog in Presidium Core via automation Feb 4, 2019
@ruaanvds
Copy link
Contributor Author

ruaanvds commented Feb 4, 2019

Here is the JSON file mentioned above - from what I can see, it's valid, so the issue is likely elsewhere in the lifecycle:

{
  "name": "presidium-template",
  "version": "0.1.39",
  "description": "Base template for a Presidium site.",
  "license": "Apache-2.0",
  "homepage": "http://presidium.spandigital.net/",
  "authors": [
    {
      "name": "SPAN Digital",
      "email": "[email protected]"
    }
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/SPANDigital/presidium-template"
  },
  "scripts": {
    "clean": "presidium clean",
    "install": "presidium install",
    "build": "presidium build",
    "start": "presidium start",
    "validate": "presidium validate",
    "gh-pages": "presidium gh-pages",
  },
  "devDependencies": {
    "presidium-core": "^0.1.42",
  }
}

@ruaanvds ruaanvds moved this from Backlog to Done in Presidium Core Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant