question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error installing jest with npm

See original GitHub issue

🐛 Bug Report

Hi all, when I try to install jest into a new project using npm install jest -D I’m getting an error that Unexpected end of JSON input while parsing near '....tgz"}},"13.2.1":{"na'

To Reproduce

Run npm install jest -D on a project that doesn’t already have jest installed.

$ npm install --save-dev jest
npm ERR! Unexpected end of JSON input while parsing near '....tgz"}},"13.2.1":{"na'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\USER\AppData\Roaming\npm-cache\_logs\2019-05-30T21_32_07_851Z-debug.log

Expected behavior

Should install jest to the current project without an error.

Run npx envinfo --preset jest

npm ERR! Unexpected end of JSON input while parsing near '...yZn8LL2jCxQQBj9HtJZ\n'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
thymikeecommented, May 31, 2019

Because if it was jest, this issue would have like a 100+ upvotes already

0reactions
github-actions[bot]commented, May 11, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot manage to install jest - Stack Overflow
I am using npm to install ...
Read more >
jest: command not found error [Solved] | bobbyhadz
Use npx to solve the error "jest: command not found", e.g. npx jest or install the package globally by running npm install -g...
Read more >
Getting Started - Jest
Install Jest using your favorite package manager: npm; Yarn. npm install --save-dev jest.
Read more >
jest-when - npm
jest -when is a lightweight JavaScript library that complements Jest by matching mock function call arguments. Jest is a great tool for ...
Read more >
Installation | ts-jest - GitHub Pages
Tip: If you get an error with the following npm commands such as npx: command not found , you can replace npx XXX...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found