# Yarn install periodically fails with error "Unexpected end of JSON input"

**URL:** <https://discuss.bitrise.io/t/yarn-install-periodically-fails-with-error-unexpected-end-of-json-input/10646>\
**Category:** Builds\
**Created:** [October 17, 2019, 9:53pm UTC](https://discuss.bitrise.io/t/yarn-install-periodically-fails-with-error-unexpected-end-of-json-input/10646 "2019-10-17T21:53:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benobi](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@benobi](https://discuss.bitrise.io/u/benobi)\
**Post date:** [October 17, 2019, 9:53pm UTC](https://discuss.bitrise.io/t/yarn-install-periodically-fails-with-error-unexpected-end-of-json-input/10646/1 "2019-10-17T21:53:37Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

`yarn install` step fails - it seems like the JSON does not fully load each time we build…

## Environment:

`Xcode 10.3.x` on macOS 10.14’  
yarn @ 0.0.8

## Reproducibility

Intermittently get the error - but very often. Rebuild does seem to resolve it.

- \_Does a “Rebuild” help? YES
- \_Does a rebuild without caches help? NO
- _Does the issue happen sporadically, or every time?_ : SPORADIC
- _Does upgrading the build Step to the latest version help?_ : NO
- _When did the issue start?_ : MONTHS AGO - JUST GOT WORSE

### Local reproduction

\_Can it be reproduced on your own Mac/PC by following our [local debug guide](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)? NO

### Local reproduction: Linux / Android (docker based) stack builds

\_Can it be reproduced by running the build locally, after doing a new git clone of the repository into the `/tmp` directory and running the build from there with the Bitrise CLI ( [Bitrise CLI](https://www.bitrise.io/cli) )? If no, can it be reproduced with Docker (using the same docker images / environment we use on [bitrise.io](http://bitrise.io))? SERIOUSLY?

## Build log

error An unexpected error occurred: “/Users/vagrant/git/node\_modules/core-js: /Users/vagrant/git/node\_modules/core-js/package.json: Unexpected end of JSON input”.

_Please copy paste the build’s [bitrise.io](http://bitrise.io) URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - [Contact us](https://www.bitrise.io/contact) ), with a link to the related Discuss issue._

[https://app.bitrise.io/build/b7d322ca6206508c](https://app.bitrise.io/build/b7d322ca6206508c)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [November 16, 2019, 9:57pm UTC](https://discuss.bitrise.io/t/yarn-install-periodically-fails-with-error-unexpected-end-of-json-input/10646/2 "2019-11-16T21:57:12Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
