-1

Somehow I've stuffed up my, previously working, ember.js environment.

When I try to start the server I get:

glaucon@polo ~/dev/ember-django-testbed $ ember s

Missing bower packages:
Package: ember
  * Specified: 2.3.0
  * Installed: 2.4.3

Run `bower install` to install missing dependencies.

If I do then run bower install I get this

glaucon@polo ~/dev/ember-django-testbed $ bower install ember --save-dev
bower ember#*                   cached git://github.com/components/ember.git#2.4.3
bower ember#*                 validate 2.4.3 against git://github.com/components/ember.git#*
bower ember#>=1.4               cached git://github.com/components/ember.git#2.4.3
bower ember#>=1.4             validate 2.4.3 against git://github.com/components/ember.git#>=1.4

But after doing that I am still left with the previous error message when I try to do ember s

I then (as per Running "ember server" fails with error) tried this

$ bower cache clean

followed by:

$ bower install ember --save-dev

But still the same error message:

Just to be sure I then followed the advice of https://stackoverflow.com/a/31167757/364088 and did the following :

$ rm -rf bower_components
$ bower cache clean
$ bower install

And .. still the same error message!


EDIT

Forgot to put this bit in. This is bower.json

glaucon@polo ~/dev/ember-django-testbed $ cat bower.json
{
  "name": "ember-django-testbed",
  "dependencies": {
    "ember": "2.3.0",
    "ember-cli-shims": "0.1.0",
    "ember-cli-test-loader": "0.2.2",
    "ember-load-initializers": "0.1.7",
    "ember-qunit-notifications": "0.1.0",
    "jquery": "1.11.3",
    "loader.js": "^3.5.0"
  },
  "resolutions": {
    "ember": "^2.4.3"
  },
  "devDependencies": {
    "ember": "^2.4.3"
  }
}
Community
  • 1
  • 1
glaucon
  • 8,112
  • 9
  • 41
  • 63

3 Answers3

2

Edit the line in bower.json dependencies from

"ember": "2.3.0"

to

"ember": "^2.4.3"
Gaurav
  • 12,662
  • 2
  • 36
  • 34
1

In bower.json, change:

"ember": "2.3.0"

To:

"ember": "^2.4.3"

After that delete bower components map and run:

bower install
stijn.aerts
  • 6,026
  • 5
  • 30
  • 46
1

Source: How to update your Ember.js project?

When you upgrade your Ember app, consider using the following steps.

Upgrade ember-cli

outside your older ember app

$ cd ~
$ npm install -g ember-cli

Check your ember-cli version (outside of your project folder).

$ cd ~
$ ember -v

You should see the latest version.

Create a totally new ember application

to see, the packages in bower.json and package.json. (For example, if you have a projects folder, and you have a temp folder for short term stuffs.) You can use the version number in the app name, so you can check it later.

$ cd ~/projects/temp
$ ember new my-v24-app

This dummy app is always a good cornerstone for checking the compatible versions.

Upgrade version numbers in your old project to match with the new dummy app.

Check your bower.json and package.json align the version numbers in your old project to match with the new defaults. (Update ember-cli, ember, ember-data, etc.) It is time to double check your other packages, like sass or firebase, etc. packages also, maybe there are an updated version which is compatible with the new Ember.

Remove bower_components and node_modules

In most of the cases when you have some package conflict, the main reason is that an older and a newer version of package stay in your package/module folder. Yes, there are commands like npm prune and bower prune which clean package folders.

However, the most safest solution if you just remove these folders and reinstall all your packages.

$ cd my-updated-project
$ rm -rf bower_components node_modules
$ npm install && bower install

Good luck! :)

Zoltan
  • 4,936
  • 1
  • 35
  • 40
  • But in my case it shows `Missing bower packages: Package: ember * Specified: 2.6.0 * Installed: 2.4.4`. Will you please tell me where to look for. – Gupta Aug 13 '16 at 10:31
  • in your project folder, you can remove and recreate bower_components. `rm -rf bower_components` and after `bower install` – Zoltan Aug 13 '16 at 14:38
  • no It is not going to help! – Gupta Aug 13 '16 at 14:41
  • What kind of operation system do you use? Windows/Linux/MacOSX, anyway, if you already have the new version in bower.json, and you delete the bower_packages folder, where previous versions are downloaded, it should work. – Zoltan Aug 14 '16 at 12:20