15

When i use,

ember new projname

project is getting created with 2.7.0 ember version. I want to create a older version ember project. What i should use? [i checked options that can be used with new command, but none helps for this.]

Praveen Kumar
  • 946
  • 3
  • 10
  • 29
  • either you need to uninstall ember-cli or update the particular project package.json. you can follow the below link for the existing project update or new setup. https://github.com/ember-cli/ember-cli/releases – Ember Freak Aug 01 '16 at 14:49
  • 4
    `either you need to uninstall ember-cli` this is horrible advice. Just go into your bower.json file and change the version to the version you require, be careful if you you go back too far some dependencies might need downgrading as well. – Patsy Issa Aug 01 '16 at 14:53
  • Hi @Kitler, thanks for your reply. Did as you told. Ember version changed.But jquery version is 2.1.4, i want 1.11.3. Which file i should change for specifying jquery version? – Praveen Kumar Aug 02 '16 at 10:41
  • 1
    got it.. i simply need to specify "jquery": "1.11.3" in bower.json and run bower install command. – Praveen Kumar Aug 02 '16 at 13:17
  • Don't forget to run install with NPM or bower for whatever you changed : ) – sheriffderek Aug 02 '16 at 20:03

2 Answers2

21

Here's what I ended up doing:

  1. create a new directory for my project and cd inside of it
  2. npm init (enter through some bogus details, doesn't matter, we're going to erase soon)
  3. npm install --save-dev ember-cli@desired.version
  4. delete package.json and package-lock.json
  5. ember new app

This got me a node_modules folder with the desired version of ember, and then also allowed me to use the ember cli to generate a project. It will create a folder with the name of the app, of course, and you can safely delete the node_modules folder in the app's parent directory.

This feels like a little bit of a round-about way of doing things, but it worked, and it seemed easier than trying to mess with my global versions.

Hope this helps someone out!

Sal
  • 311
  • 2
  • 5
9

Ember new will create project at the most current version installed on your system.

There are 2 ways around this.

Install an older version of ember-cli globally for the desired version. The benefit would be that you create a new app at the desired version from the get go:

(change @2.11.0 to the desired version from https://github.com/emberjs/ember.js/releases)

npm uninstall -g ember-cli
npm cache clean
npm install -g ember-cli@2.11.0

Keep the current ember-cli version and then downgrade by changing the ember value in package.json :

(this will work for small version changes, not major changes)

enter image description here

you will need to re init your ember app (change 2.11.0 to what you need from https://github.com/emberjs/ember.js/releases)

rm -rf node_modules dist tmp
npm install --save-dev ember-cli@2.11.0
ember init

Node.js is required with every Ember installation and you have to check which version of node is required for the desired version of Ember you want to install. Most likely itll work well with the version currently installed. you can download the latest (LTS) from: https://nodejs.org/en/

or older versions from: https://nodejs.org/dist/

OSx for example https://nodejs.org/dist/v4.7.0/node-v4.7.0-linux-x64.tar.gz


results

enter image description here

LocalPCGuy
  • 6,006
  • 2
  • 32
  • 28
mihai
  • 4,184
  • 3
  • 26
  • 27