# Yarn setup keep failing

**URL:** <https://forum.ghost.org/t/yarn-setup-keep-failing/795>\
**Category:** Developer help\
**Created:** [April 7, 2018, 11:36am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795 "2018-04-07T11:36:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Chiu](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Peter\_Chiu](https://forum.ghost.org/u/Peter_Chiu)\
**Post date:** [April 7, 2018, 11:36am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/1 "2018-04-07T11:36:01Z")

</div>

Followed steps outlined here but keep getting error at “yarn setup”.

[https://docs.ghost.org/docs/working-with-ghost](https://docs.ghost.org/docs/working-with-ghost)

Errors:

Build failed.  
Build Error (Babel) in lodash/includes.js

unexpected end of file

Stack Trace and Error Report: /var/folders/23/8txnjtts6cs\_fr10nhv15zyc0000gq/T/error.dump.16e6f83f0c5a38370c4845dc7287711b.log  
npm ERR! code ELIFECYCLE  
npm ERR! errno 1  
npm ERR! ghost-admin@1.22.1 build: `ember build`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the ghost-admin@1.22.1 build script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:  
npm ERR! /Users/peterchiu/.npm/\_logs/2018-04-07T11\_21\_19\_824Z-debug.log  
Warning: Command failed: npm run build  
Build Error (Babel) in lodash/includes.js

unexpected end of file

Stack Trace and Error Report: /var/folders/23/8txnjtts6cs\_fr10nhv15zyc0000gq/T/error.dump.16e6f83f0c5a38370c4845dc7287711b.log  
npm ERR! code ELIFECYCLE  
npm ERR! errno 1  
npm ERR! ghost-admin@1.22.1 build: `ember build`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the ghost-admin@1.22.1 build script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:  
npm ERR! /Users/peterchiu/.npm/\_logs/2018-04-07T11\_21\_19\_824Z-debug.log  
Use --force to continue.

Aborted due to warnings.  
Warning: Failed running “grunt shell:ember:dev” in “core/client”. Use --force to continue.

---

<div class="post-metadata">

**Author:** ![Peter\_Chiu](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Peter\_Chiu](https://forum.ghost.org/u/Peter_Chiu)\
**Post date:** [April 8, 2018, 8:53am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/2 "2018-04-08T08:53:52Z")

</div>

anybody home? seems the community for ghost is not to active

---

<div class="post-metadata">

**Author:** ![acburdine](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/acburdine/32/4825_2.png) [@acburdine](https://forum.ghost.org/u/acburdine)\
**Post date:** [April 9, 2018, 12:24am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/3 "2018-04-09T00:24:50Z")

</div>

@Peter_Chiu It looks like something got messed up when you installed the ghost-admin dependencies.

You might try going into your ghost admin directory, deleting the node\_modules folder, then running `yarn setup` again.

`cd core/client && rm -rf node_modules && cd ../../ && yarn setup`

---

<div class="post-metadata">

**Author:** ![Peter\_Chiu](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Peter\_Chiu](https://forum.ghost.org/u/Peter_Chiu)\
**Post date:** [April 10, 2018, 10:26am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/4 "2018-04-10T10:26:09Z")

</div>

@acburdine Thanks for the reply. In fact I completed removed the entire git clone and started over but still got the same error. I even installed a fresh version of node v6 using nvm and still got the same error…

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [April 10, 2018, 2:43pm UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/5 "2018-04-10T14:43:27Z")

</div>

@Peter_Chiu Try running `yarn cache clean` then running the setup command again

`cd core/client && rm -rf node_modules && cd ../../ && yarn setup`

The yarn cache dir is usually separate to the npm/nvm dirs so even though you installed a fresh version of node you may still have had a corrupted package in the cache.

---

<div class="post-metadata">

**Author:** ![Peter\_Chiu](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Peter\_Chiu](https://forum.ghost.org/u/Peter_Chiu)\
**Post date:** [April 10, 2018, 4:25pm UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/6 "2018-04-10T16:25:45Z")

</div>

Thanks @Kevin but unfortunately same error…

Here’s the error dump for your information. Thanks a lot.

=================================================================================

ENV Summary:

TIME: Tue Apr 10 2018 23:22:51 GMT+0700 (+07)  
TITLE: ember  
ARGV:

- /Users/peterchiu/.nvm/versions/node/v6.14.1/bin/node
- /Users/peterchiu/tmp2/Ghost/core/client/node\_modules/.bin/ember
- build  
EXEC\_PATH: /Users/peterchiu/.nvm/versions/node/v6.14.1/bin/node  
TMPDIR: /var/folders/23/8txnjtts6cs\_fr10nhv15zyc0000gq/T  
SHELL: /bin/bash  
PATH:
- /Users/peterchiu/.nvm/versions/node/v6.14.1/lib/node\_modules/npm/node\_modules/npm-lifecycle/node-gyp-bin
- /Users/peterchiu/tmp2/Ghost/core/client/node\_modules/.bin
- /Users/peterchiu/tmp2/Ghost/core/client/node\_modules/.bin
- /Users/peterchiu/tmp2/Ghost/core/node\_modules/.bin
- /Users/peterchiu/tmp2/Ghost/node\_modules/.bin
- /Users/peterchiu/tmp2/node\_modules/.bin
- /Users/peterchiu/node\_modules/.bin
- /Users/node\_modules/.bin
- /node\_modules/.bin
- /Users/peterchiu/.nvm/versions/node/v6.14.1/bin
- /Users/peterchiu/tmp2/Ghost/node\_modules/.bin
- /Users/peterchiu/.config/yarn/link/node\_modules/.bin
- /Users/peterchiu/tmp2/Ghost/node\_modules/.bin
- /Users/peterchiu/.config/yarn/link/node\_modules/.bin
- /Users/peterchiu/.nvm/versions/node/v6.14.1/libexec/lib/node\_modules/npm/bin/node-gyp-bin
- /Users/peterchiu/.nvm/versions/node/v6.14.1/lib/node\_modules/npm/bin/node-gyp-bin
- /Users/peterchiu/.nvm/versions/node/v6.14.1/bin/node\_modules/npm/bin/node-gyp-bin
- /anaconda3/bin
- /Users/peterchiu/.nvm/versions/node/v6.14.1/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin  
PLATFORM: darwin x64  
FREEMEM: 968671232  
TOTALMEM: 17179869184  
UPTIME: 309949  
LOADAVG: 7.32666015625,7.14208984375,8.30322265625  
CPUS:
- Intel® Core™ i7-7567U CPU @ 3.50GHz - 3500
- Intel® Core™ i7-7567U CPU @ 3.50GHz - 3500
- Intel® Core™ i7-7567U CPU @ 3.50GHz - 3500
- Intel® Core™ i7-7567U CPU @ 3.50GHz - 3500  
ENDIANNESS: LE  
VERSIONS:
- ares: 1.10.1-DEV
- http\_parser: 2.8.0
- icu: 58.2
- modules: 48
- node: 6.14.1
- openssl: 1.0.2o
- uv: 1.16.1
- v8: 5.1.281.111
- zlib: 1.2.11

ERROR Summary:

- broccoliBuilderErrorStack: Error: unexpected end of file  
at Zlib.\_handle.onerror (zlib.js:371:17)

- codeFrame: unexpected end of file

- errorMessage: Build Canceled: Broccoli Builder ran into an error with `Babel` plugin. 💥  
unexpected end of file

- errorType: Build Error

- location:

- message: Build Canceled: Broccoli Builder ran into an error with `Babel` plugin. 💥  
unexpected end of file

- name: Error

- nodeAnnotation: Babel

- nodeName: Babel

- originalErrorMessage: unexpected end of file

- stack: Error: unexpected end of file  
at Zlib.\_handle.onerror (zlib.js:371:17)

=================================================================================

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [April 10, 2018, 5:14pm UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/7 "2018-04-10T17:14:03Z")

</div>

Unfortunately the dumps don’t really help, it seems the root problem is happening outside of what the logs can show. Have you restarted your machine at all? I’ve seen similar (but not exactly the same) issues occur on macOS and a restart fixed them 😕

---

<div class="post-metadata">

**Author:** ![Peter\_Chiu](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Peter\_Chiu](https://forum.ghost.org/u/Peter_Chiu)\
**Post date:** [April 10, 2018, 6:00pm UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/8 "2018-04-10T18:00:46Z")

</div>

Hi Kevin

Yes I have tried restarting but didn’t help.

I can get you any other info you might need towards troubleshooting this. Please let me know what you need.

Thanks!

Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Chiu](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Peter\_Chiu](https://forum.ghost.org/u/Peter_Chiu)\
**Post date:** [April 13, 2018, 4:57am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/9 "2018-04-13T04:57:24Z")

</div>

Hi @Kevin may I know if you need any additional information? thanks.

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [April 13, 2018, 10:25am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/10 "2018-04-13T10:25:53Z")

</div>

Hey @Peter_Chiu, I’m afraid I’m not sure what else to suggest here other than to try the `yarn cache clean`, removing the `node_modules` dir in `core/client` and trying the setup process again. As far as I can see the problem is coming from a corrupted npm package download rather than anything specific to Ghost.

You can see others who’ve run into similar problems here [unexpected end of file at Zlib.\_handle.onerror (zlib.js:370:17) · Issue #3601 · yarnpkg/yarn · GitHub](https://github.com/yarnpkg/yarn/issues/3601)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [April 27, 2018, 10:25am UTC](https://forum.ghost.org/t/yarn-setup-keep-failing/795/11 "2018-04-27T10:25:56Z")

</div>

Closed on April 27, 2018, 10:25am UTC

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