tonycoco / heroku-buildpack-ember-cli

A Heroku Buildpack for Ember CLI Applications
MIT License
321 stars 121 forks source link

Recent changes seem to break my heroku builds (from Sep 23) #102

Closed gitstevenpham closed 8 years ago

gitstevenpham commented 8 years ago

Hello,

I Used the buildpack Sunday for my productions server and used the latest version today for a staging. Im assuming the latest changes is causing the issue I am encountering when I push new code to my staging. The following error occurs:

----> Removing .DS_Store files -----> Fetching custom git buildpack... done -----> Ember CLI app detected -----> Building environment: production PRO TIP: Avoid using semver ranges starting with '>' in engines.node See https://devcenter.heroku.com/articles/nodejs-support -----> Requested node range: >= 0.10.0 -----> Resolved node version: 0.12.7 -----> Downloading and installing node -----> Using default npm version: 2.11.3 -----> Downloading and installing nginx -----> Adding boot script -----> Copying configs -----> Restoring node_modules directory from cache -----> Restoring bower_components directory from cache -----> Bower already exists -----> Exporting config vars to environment -----> Pruning cached dependencies not specified in package.json unbuild bower@1.5.2 -----> Pruning cached bower dependencies not specified in bower.json /tmp/buildpack_8174b6bff831be36ae4042a0357927f3/bin/compile: line 202: bower: command not found ! Push rejected, failed to compile Ember CLI app

Setting the force rebuild flag to true for npm and bower fixed my issue though but I'm assuming this shouldn't happen

tompesman commented 8 years ago

Yes, I can confirm this.

danconnell commented 8 years ago

Also experiencing this issue. Clearing the Heroku cache works once, but then on the next deploy it's broken again and I have to clear the cache on every deploy.

tonycoco commented 8 years ago

Running: heroku config:set REBUILD_ALL=true is the fix. Will document this. Sorry about the clash here. It happened when we merged in a change to make deploys faster in the future!

/cc @tompesman @danconnell @spham92

tonycoco commented 8 years ago

Once it is rebuilt, you can unset that var: heroku config:unset REBUILD_ALL

tonycoco commented 8 years ago

Added the steps to resolve in the README.md

sbounmy commented 8 years ago

For those having the following error:

remote: -----> Restoring node_modules directory from cache
remote: -----> Pruning cached dependencies not specified in package.json
remote:        unbuild bower@1.5.2
remote: -----> Node version changed since last build; rebuilding dependencies
remote:
remote:        > node-sass@3.3.1 install /tmp/build_ebae3bc0e05a01ecde06c9cadbe3a643/node_modules/broccoli-sass/node_modules/node-sass
remote:        > node scripts/install.js
remote:
remote:        Cannot download "https://github.com/sass/node-sass/releases/download/v3.3.1/linux-x64-46_binding.node": HTTP error 404 Not Found
remote:
remote:        > node-sass@3.3.1 postinstall /tmp/build_ebae3bc0e05a01ecde06c9cadbe3a643/node_modules/broccoli-sass/node_modules/node-sass
remote:        > node scripts/build.js
remote:
remote:        Building: /tmp/build_ebae3bc0e05a01ecde06c9cadbe3a643/vendor/node/bin/node /tmp/build_ebae3bc0e05a01ecde06c9cadbe3a643/node_modules/broccoli-sass/node_modules/node-sass/node_modules/pangyp/bin/node-gyp.js rebuild --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
remote:        gyp WARN install got an error, rolling back install
remote:        gyp ERR! configure error
remote:        gyp ERR! stack Error: 404 status code downloading tarball
.
.
.
.
remote: 9973 error code ELIFECYCLE
remote: 9974 error node-sass@3.3.1 postinstall: `node scripts/build.js`
remote: 9974 error Exit status 1
remote: 9975 error Failed at the node-sass@3.3.1 postinstall script 'node scripts/build.js'.
remote: 9975 error This is most likely a problem with the node-sass package,
remote: 9975 error not with npm itself.
remote: 9975 error Tell the author that this fails on your system:
remote: 9975 error     node scripts/build.js
remote: 9975 error You can get their info via:
remote: 9975 error     npm owner ls node-sass
remote: 9975 error There is likely additional logging output above.
remote: 9976 verbose exit [ 1, true ]
remote:
remote:  !     Push rejected, failed to compile Ember CLI app
remote:
remote: Verifying deploy....
remote:
remote: !   Push rejected to myapp.

I recommend to purge the cache and reinstall all dependencies:

$ heroku plugins:install https://github.com/heroku/heroku-repo.git
$ heroku repo:purge_cache -a APPNAME

Maybe we could add this on top of README aswell :)