How to upgrade ember cli version - ember.js

I upgraded ember-cli to version 2.4.3
npm install -g ember-cli
I can see -- ember-cli#2.4.3 , in the listed dependencies,
but when I check :
(master *)$ ember -v
version: 2.4.2
node: 5.6.0
os: darwin x64
ember cli version is still 2.4.2
what's wrong ?

Updating Ember-CLI's version and ember project's version are different thing.
To update Ember-CLI:
npm uninstall -g ember-cli
npm cache clean
bower cache clean
npm install -g ember-cli#1.13.14
To update your project:
rm -rf node_modules bower_components dist tmp
npm install --save-dev ember-cli#1.13.14
npm install
bower install
ember init
Here is the resource: https://github.com/ember-cli/ember-cli/releases
I strongly recomend you to select which files will be overwritten. You should compare diffs of files. application.hbs, router.js, environment.js, ember-cli-build.js are important files those you don't want them to be overwritten.
UPDATE 2020-02-19:
ember-cli-update
handles updating your project.

Related

Ember 2.7.2 and ember-models-table: A helper named "models-table" could not be found

I install Ember 2.7.2 and I create my first application. I install the addon ember-models-table (ember install ember-models-table).
Template:
<h3>Prueba</h3>
{{models-table
data=model
columns=columns}}
I use "ember server" to test my app. When I go to http://localhost:4200/prueba I see this error in console:
Uncaught Error: Assertion Failed: A helper named "models-table" could not be found
Any idea of what is wrong?
Maybe you didn't install this addon correctly for some reason. All I can recommend you is to re-install it by typing these commands:
npm uninstall --save ember-models-table
npm prune
rm -rf node_modules tmp
npm cache clean
npm install
ember install ember-models-table
If the problem still exists after you re-install the addon, probably something is wrong with your environment, not the ember itself.

Installing Ember.js 2.2

I tried do install Ember.js v2.2 by following the official instructions: http://guides.emberjs.com/v2.2.0/getting-started/
installed Node.js and npm
installed Git
installed the Ember CLI via npm install -g ember-cli
Everything should be fine now.
But when I type ember -v to verify the Ember version, it says: 1.13.13
I did follow the 2.2 Instructions to the point, but I didn't get Ember.js 2.2 installed.
Any suggestions? I use Win 7.
For ember 2.2 + ember-data 2.3.1:
ember new <project> && cd <project>
Edit bower.json in your project root directory (you're there already if you followed the previous command):
Replace ember-cli-shims version number to 0.1.0
Replace ember version number to 2.2
Remove the ember-data dependency line
Add the following code just above the last }
,
"resolutions": {
"ember": "^2.2.0"
}
Edit package.json in your project root directory:
Replace ember-data version number to 2.3.1
Clean the caches, update the project dependencies and then restart ember:
npm cache clean && bower cache clean && npm install && bower install
ember serve
And you're done. Open your browser console and you should see debug messages with the 2.2 version of ember and 2.3.1 version of ember-data.
ember on the command line is actually invoking Ember-CLI, so ember -v will show you the version you have for Ember-CLI. When you do ember new <your project> to create a project then you can manually change the Ember and Ember Data dependency versions in bower.json and package.json. Make sure to update both files (for now at least) and rerun npm install and bower install in the project's root directory.
The Ember version set by default with ember-cli does not track the most recent version of Ember, but you can update to 2.x. See the changelog.
Ember itself you will interact with in the browser after running ember server and going to your localhost.

How do I update ember.js to version 2.0.1

I'm fairly new to ember.js
Before starting my project I wanted to upgrade my version to the latest 2.0.1 release.
I went through the steps in the guide.
sudo npm uninstall -g ember-cli
sudo npm cache clean
bower cache clean
sudo npm install -g ember-cli
typing: ember -v gives 1.13.8 just as it did before the 'update'
I can see that the ember-cli website says 1.13.8 is the latest version of ember-cli.
However since the emberjs.com site says the latest release is 2.0.1 and on the homepage the isntruction is to run npm install -g ember-cli I would expect the command
ember -v to return 2.0.1 if I was using the latest release.
I created a new ember project using ember new test and ran
grep -r 'version' * to see if there were any clues but found nothing of interest.
Looking at package.json reveals that ember-data 1.13.8 is one of the dependencies which is also not the latest version (2.0.0)
What (if any) is the difference between ember-cli and ember.js versions?
When I type ember -v the version of which program is being displayed?
If I'm not on the latest release, how can I get it installed?
I'm running ubuntu 14.04
The current version of Ember-cli installs Ember 1.13.8. You need to update your bower.json to use the 2.0.1 version of ember.
"dependencies": {
"ember": "2.0.1",
},
and then run bower install.

Ember : downgrading ember with bower install

I've been switching to the 1.13.2 version of ember on a git branch, and now I want to come back to 1.11.1 when going back to an other branch.
I've been running npm install and bower install without failure.
But when I run ember server I run into the following error :
Missing bower packages:
Package: ember
* Specified: 1.11.1
* Installed: 1.13.2
Run `bower install` to install missing dependencies.
Running bower install again does not solve the problem, neither does bower cache clean.
Do
$ rm -rf bower_components
$ bower cache clean
$ bower install

npm install ember-data just installs index.js file

When I do npm install ember-data --save, I get only the following files:
./node_modules/ember-data/
./node_modules/ember-data//lib
./node_modules/ember-data//lib/ember-addon
./node_modules/ember-data//lib/ember-addon/blueprints
./node_modules/ember-data//lib/ember-addon/blueprints/ember-data
./node_modules/ember-data//lib/ember-addon/blueprints/ember-data/index.js
./node_modules/ember-data//lib/ember-addon/index.js
./node_modules/ember-data//package.json
./node_modules/ember-data//README.md
I was expecting the same files bower installs, such as ember-data.min.js.
My hunch is I need to do npm install from within node_modules/ember-data? If so, why the extra step?
ember-data is meant to be installed with bower with
$ bower install --save ember-data
Installing ember-data with npm will add it as an add-on for ember-cli project. It will include the files from bower_components. you still need the bower version.
ember-cli has built-in support for ember-data.