js-kyle / js-kyle/npm-viewscripts
Fail with SyntaxError: Unexpected end of JSON input
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
➜ npx npm-viewscripts
Need to install the following packages:
npm-viewscripts
Ok to proceed? (y) y
No potentially unsafe scripts found.
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /home/username/.npm/_npx/b4f17dfd428193b3/node_modules/npm-viewscripts/index.js:12:22
at directoryTree (/home/cherrytea/.npm/_npx/b4f17dfd428193b3/node_modules/directory-tree/lib/directory-tree.js:108:7)
at /home/username/.npm/_npx/b4f17dfd428193b3/node_modules/directory-tree/lib/directory-tree.js:121:21
at Array.map (<anonymous>)
at directoryTree (/home/cherrytea/.npm/_npx/b4f17dfd428193b3/node_modules/directory-tree/lib/directory-tree.js:121:8)
at /home/username/.npm/_npx/b4f17dfd428193b3/node_modules/directory-tree/lib/directory-tree.js:121:21
at Array.map (<anonymous>)
at directoryTree (/home/cherrytea/.npm/_npx/b4f17dfd428193b3/node_modules/directory-tree/lib/directory-tree.js:121:8)
at /home/username/.npm/_npx/b4f17dfd428193b3/node_modules/directory-tree/lib/directory-tree.js:121:21
➜ node -v
v16.4.1
➜ npm -v
7.19.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported npx npm-viewscripts failure with Node 16.4.1 and npm 7.19.1, then inspect index.js at line 12 where the stack trace shows JSON.parse failing. Done means the reported project no longer exits with an uncaught SyntaxError when no potentially unsafe scripts are found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100