Monday 1 May 2017

Why am I getting this issue when trying to build with Gulp?

I have a project running on Heroku that builds automatically from a branch master when pushed to Git.

When I go to the log of Heroku I get this issue:

-----> Building dependencies
   Installing node modules (yarn.lock)
   yarn install v0.23.3
   [1/4] Resolving packages...
   [2/4] Fetching packages...
   warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
   info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
   [3/4] Linking dependencies...
   [4/4] Building fresh packages...
   $ npm rebuild node-sass; ./node_modules/.bin/gulp build --production

   > node-sass@3.13.1 install /tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/node-sass
   > node scripts/install.js

   node-sass build Binary found at /tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/node-sass/vendor/linux-x64-48/binding.node

   > node-sass@3.13.1 postinstall /tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/node-sass
   > node scripts/build.js

   Binary found at /tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/node-sass/vendor/linux-x64-48/binding.node
   Testing binary
   Binary is fine
   node-sass@3.13.1 /tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/node-sass
   [17:02:47] Using gulpfile /tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/gulpfile.js
   [17:02:47] Starting 'clean'...
   [17:02:47] Finished 'clean' after 7.78 ms
   [17:02:47] Starting 'templates'...
   [17:02:47] Finished 'templates' after 12 ms
   [17:02:47] Starting 'assets'...
   [17:02:47] Starting 'sass'...
   [17:02:47] Starting 'jsmin'...
   [17:02:47] Finished 'jsmin' after 3.98 ms

   events.js:160
   throw er; // Unhandled 'error' event
   ^
   GulpUglifyError: unable to minify JavaScript
   at createError (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/gulp-uglify/lib/create-error.js:6:14)
   at wrapper (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/lodash/_createHybrid.js:87:15)
   at trycatch (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/gulp-uglify/minifier.js:26:12)
   at DestroyableTransform.minify [as _transform] (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/gulp-uglify/minifier.js:79:19)
   at DestroyableTransform.Transform._read (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/readable-stream/lib/_stream_transform.js:159:10)
   at DestroyableTransform.Transform._write (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/readable-stream/lib/_stream_transform.js:147:83)
   at doWrite (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/readable-stream/lib/_stream_writable.js:338:64)
   at writeOrBuffer (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/readable-stream/lib/_stream_writable.js:327:5)
   at DestroyableTransform.Writable.write (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/readable-stream/lib/_stream_writable.js:264:11)
   at write (/tmp/build_68e6a442ae79fc64d2b95c08173d6b58/BTCMedia-distributed-c77ea914a40e6bc88ce9f07918cb23e4c6fc0d0a/node_modules/vinyl-buffer/node_modules/readable-stream/lib/_stream_readable.js:623:24)
   error Command failed with exit code 1.
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
   -----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys

   Some possible problems:

   - Node version not specified in package.json
   https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

   - This project was built with yarn, which is new and under development. Some projects can still be built more reliably with npm

I tried to figure out with the information provided. But I was unable to.

Any idea of what could be causing this?



via Pablo Viacheslav

No comments:

Post a Comment