Languages
[Edit]
EN

Yarn - cache clean (error An unexpected error occurred: "C:\Users\John\...\node_modules\osenv\.yarn-metadata.json: Unexpected end of JSON input")

6 points
Created by:
a_horse
478

In this article we would like to show how to clean yarn cache when following error occcured:

error An unexpected error occurred: "C:\Users\John\AppData\Local\Yarn\Cache\v6\npm-osenv-0.1.5-85cdfafaeb28e8677f416e287592b5f3f49ea410-integrity\node_modules\osenv\.yarn-metadata.json: Unexpected end of JSON input"

Run in terminal (in project directory):

yarn cache clean

Check below description too:

Probem overview

During yarn install executing I got folowing error:

$ yarn install
yarn install v1.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "C:\Users\John\AppData\Local\Yarn\Cache\v6\npm-osenv-0.1.5-85cdfafaeb28e8677f416e287592b5f3f49ea410-integrity\node_modules\osenv\.yarn-metadata.json: Unexpected end of JSON input".
info If you think this is a bug, please open a bug report with the information provided in "C:\Users\John\Desktop\Projects\seller-operator-ui\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Problem solution

Run in terminal (in project directory):

yarn cache clean

 

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join