Yarn setup keep failing


#1

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

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.


#2

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


#3

@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


#4

@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…


#5

@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.


#6

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. :boom:
    unexpected end of file

  • errorType: Build Error

  • location:

    • column: [undefined]
    • file: lodash/includes.js
    • line: [undefined]
    • treeDir: /Users/peterchiu/tmp2/Ghost/core/client/tmp/broccoli_persistent_filterbabel__babel_lodash-input_base_path-b2x0WX6R.tmp
  • message: Build Canceled: Broccoli Builder ran into an error with Babel plugin. :boom:
    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)

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


#7

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 :confused:


#8

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


#9

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


#10

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 https://github.com/yarnpkg/yarn/issues/3601


#11

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