tonycoco / heroku-buildpack-ember-cli

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

App builds fine locally, fails to deploy ("Unable to find suitable version for ember") #94

Closed balinterdi closed 9 years ago

balinterdi commented 9 years ago

I followed the steps in the README.md and trying to deploy my Ember CLI app.

Everything goes find with installing the npm dependencies but the deployment fails when it comes to installing the bower ones:

remote: bower FakeXMLHttpRequest#~1.0.0     invalid-meta fake-xml-http-request is missing "ignore" entry in bower.json
remote: bower ember#2.0.0                   invalid-meta ember is missing "ignore" entry in bower.json
remote: bower ember#>=1.4 <2                invalid-meta ember is missing "ignore" entry in bower.json
remote: bower                                  ECONFLICT Unable to find suitable version for ember

So basically some package has a constraint of Ember <2 and another one specifies Ember to be 2.0.0. I had actually found two packages that specified the <2 constraint but updated those ones so that that dependency has been lifted (it is now >= 1.4).

However, I still get the above error when trying to do the deploy although none of the packages defines the ember#>=1.4 <2 dependency anymore (I double checked). I suspected that the package resolutions might have been cached but

  1. I never managed to deploy successfully and I assume packages only get cached by heroku upon successful deploy.
  2. I tried to explicitly purge the repo cache, though I'm not sure I succeeded since it gave me an error at the end.

I followed the troubleshooting steps but it did not change anything.

The one thing I'm not sure I'm doing as I should is that I issued the heroku create command in the directory of the Ember CLI app while the README says: "Creating a new Heroku instance from an Ember CLI application's parent directory".

Could it be that this is the source of my problems?

Thank you.

balinterdi commented 9 years ago

For what it's worth, destroying the old app and creating a new one leads to the exact same error.

tonycoco commented 9 years ago

I'll investigate. Mind sending/posting your package.json?

balinterdi commented 9 years ago

Thank you for looking into this, Tony. Here is my package.json:

{
  "name": "rarwe",
  "version": "0.0.0",
  "description": "Small description for rarwe goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.1.2",
    "ember-cli": "1.13.8",
    "ember-cli-app-version": "0.5.0",
    "ember-cli-babel": "^5.1.3",
    "ember-cli-content-security-policy": "0.4.0",
    "ember-cli-dependency-checker": "^1.0.1",
    "ember-cli-htmlbars": "0.7.9",
    "ember-cli-htmlbars-inline-precompile": "^0.2.0",
    "ember-cli-ic-ajax": "0.2.1",
    "ember-cli-inject-live-reload": "^1.3.1",
    "ember-cli-pretender": "0.3.2",
    "ember-cli-qunit": "^1.0.0",
    "ember-cli-release": "0.2.3",
    "ember-cli-sri": "^1.0.3",
    "ember-cli-star-rating": "*",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "2.0.0",
    "ember-disable-proxy-controllers": "^1.0.0",
    "ember-export-application-global": "^1.0.3",
    "liquid-fire": "0.21.2"
  }
}
balinterdi commented 9 years ago

Let me copy my bower.json again as deployment fails when resolving the bower dependencies:

{
  "name": "rarwe",
  "dependencies": {
    "ember": "2.0.0",
    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.4",
    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
    "ember-data": "2.0.0",
    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6",
    "ember-qunit": "0.4.9",
    "ember-qunit-notifications": "0.0.7",
    "ember-resolver": "~0.1.18",
    "jquery": "^1.11.3",
    "loader.js": "ember-cli/loader.js#3.2.1",
    "qunit": "~1.18.0",
    "bootstrap": "~3.3.2",
    "pretender": "^0.6.0"
  }
}

And as I said, nothing seems to define the >=1.4 <2 dependency anymore so it really seems like a caching issue to me (as the following two libs did have the >=1.4 <2 before I updated them to their latest version):

$ ag '>=1.4' bower_components                                                                                                                                                     two-oh 505d2c2
bower_components/ember-cli-shims/bower.json
21:    "ember": ">=1.4"

bower_components/ember-load-initializers/bower.json
20:    "ember": ">=1.4"
balinterdi commented 9 years ago

I have now also tried rebuilding the packages during deployment as described in the README:

$ heroku config:set REBUILD_ALL=true
$ git commit -am 'rebuild' --allow-empty
$ git push heroku master

But this gave me the same error as before.

balinterdi commented 9 years ago

Hey, Tony, ignore this issue, it was completely my fault. I worked on a branch, and did not specify that branch when pushing to Heroku. So I did git push heroku master instead of git push heroku my-branch:master. That resulted in the "old" version (the one on master) being deployed which still had the conflicting version number.

Sorry about the false alarm, hopefully you didn't spend too much time with this.

tonycoco commented 9 years ago

No problem, glad you got it figured out!