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

Running via npx generates "Unexpected end of JSON input" error. #141

DuaneOBrien opened this Issue Mar 4, 2019 · 0 comments


None yet
1 participant
Copy link

DuaneOBrien commented Mar 4, 2019

Issue Report

Running repolinter via npx generates the following error:

duaneo@MACHINE:~/Code/working/repolinter$ npx repolinter  --git
npx: installed 55 in 2.351s
Target directory: /home/duaneo/Code/working/repolinter/tmp/cfa1a24e-b3d3-4be1-83bf-4abd4c073a2d
Ruleset: ../../../../../repolint.json
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Linguist.identifyLanguagesSync (/home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/lib/linguist.js:19:17)
    at module.exports (/home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/axioms/linguist.js:8:28)
    at Object.getOwnPropertyNames.forEach.axiomId (/home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/index.js:44:32)
    at Array.forEach (<anonymous>)
    at Object.lint (/home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/index.js:38:48)
    at git.clone (/home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/bin/repolinter.js:16:18)
    at Git.<anonymous> (/home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/node_modules/simple-git/src/git.js:221:18)
    at done (/home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/node_modules/simple-git/src/git.js:1432:21)
    at /home/duaneo/.npm/_npx/27541/lib/node_modules/repolinter/node_modules/simple-git/src/git.js:1457:16
Target directory: /home/duaneo/Code/working/repolinter/tmp/cfa1a24e-b3d3-4be1-83bf-4abd4c073a2d

The error does not prevent repolinter from running successfully.

Expected Behavior

Runs with no errors.

This error does not occur when running repolinter using

node bin/repolinter.js --git

Actual Behavior

repolinter runs and completes successfully, but generates an error.

Steps to Reproduce the Issue

npx repolinter --git

OS: Ubuntu 18.04.2 LTS
node: v8.10
npx: 10.2.0
npm: 3.5.2
ruby: 2.5.1p57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.