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.]
Here's what I ended up doing:
create a new directory for my project and cd inside of it
npm init (enter through some bogus details, doesn't matter, we're going to erase soon)
npm install --save-dev ember-cli#desired.version
delete package.json and package-lock.json
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!
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)
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
Related
Angular has https://update.angular.io/ that guides with the proper way to update (along with dependencies et al.). Likewise, is there a way to know how to update an Ember app properly?
Obviously, changing the version of the ember package in bower.json and doing an bower install && npm install doesn't seem to be the ideal way.
Detailed update information are included in release notes provided for ember-cli on GitHub: https://github.com/ember-cli/ember-cli/releases/
For projects that aren't using a very old version, the workflow is mostly this one:
Update globally installed ember-cli to latest stable release
Update globally installed ember-cli-update to latest stable release
Clean up your project by deleting tmp, dist and node_modules folders.
Run ember-cli-update to update project to match current blueprint.
Run ember-cli-update --run-codemods to update project to match current best practices.
Before ember-cli-update has become the official tool for updating projects, running ember init again after updating projects ember-cli dependency manually was the officially recommended workflow. ember-cli#3.2.0 was the last release for which this workflow was recommended. But ember-cli-update should support all versions for which a tag exists in ember-new-output repo, which should be true for all stable releases of ember-cli.
You could of course update your dependencies individually and not follow the recommended configuration provided by ember-cli. But be aware that uncommon combination may not work as stable as you are used to.
If your app still uses Ember App Kit, which has been deprecated in 2014, you could find a migration guide in their readme. But you should consider carefully if rewriting wouldn't be quicker than updating such an outdated app.
You can find a complete step-by-step guide for upgrading an ember here,
https://cli.emberjs.com/release/basic-use/upgrading/
I would like to update an addon to the long term support release channel using ember-cli. How do I do this?
I know I can put a different version of ember and ember-data in de bower.json and package.json files. But will updates of ember-cli not interfere with these older versions?
Also what is the lts release of ember-data?
The current LTS is 2.4, so you need to open your bower.json and in the ember line, put the following:
"ember": "~2.4.0"
This should install the latest 2.4 at the time of the install.
But will updates of ember-cli not interfere with these older versions?
Ember CLI is mostly decoupled from Ember itself, so it can be used with almost any version. When ember.js is converted into an addon (like what happened with ember-data), you'll need to mind the update instructions for it, so you continue to use the bower package instead of the npm addon.
At the moment Ember Data does not have an LTS.
I believe I may have an environment issue here, but I'm quite stuck as to what I can to do resolve it. I created an ember-cli project, committed it to git, added a few things. I ran the typical npm install && bower install commands and tried ember s.
Although the site loads fine, when I browsed to the http://localhost:4200/tests/ to ensure qunit was up and running, I had a few errors.
Uncaught Error: Could not find module `ember-qunit` imported from `ember-project/tests/test-helper
Uncaught Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js".
Immediately this raised a red flag, as I have created several ember projects before and not run into similar issues. I had my partners (I'm in school) checkout the project, run the npm install && bower install && ember s and the qunit module worked fine for them!
I've tried to git clone a new repo several times, I've even went so far as to uninstall node and bower completely, but no matter what I try I cannot seem to pull up a normal /tests checkout.
My partners were both running VMs - Ubuntu and Debian, while I'm on a mac, but that seems like it shouldn't be too big of an issue, especially since I created the project!
I've looked several places for this (here, here, and here), but I cannot seem to come to a conclusion which works for me.
I do have an identical bower.json as the rest of my group. I've included the picture below of my file structure, my bower.json, and my tests/index.html.
screenshot
Here are some environment stats:
ember version: 1.13.13
node: 5.0.0
os: darwin x64
bower: 1.7.1
One thing that I did notice is a difference when I do this to see npm's version, but I'm not sure if that matters or not.
ember -v
npm: 2.14.10
npm -v
npm: 3.5.2
It appears to be a regression from the work in ember-cli beta. You can track the progress here https://github.com/ember-cli/ember-cli/issues/5411.
For now, you can add
app.import('bower_components/qunit/qunit/qunit.js');
app.import('bower_components/ember-qunit/ember-qunit.amd.js');
to ember-cli-build.js as a workaround.
I'm trying to setup an EmberJS project using ember-cli. I want to be able to use Mocha/Chai instead of the default qunit, but I am getting an error at the first step on installing ember-cli-mocha.
I create the new ember project with ember new my-project and then from within the project folder I run ember install ember-cli-mocha, selecting Yes to overwrite the tests/test-helper.js.
In the output, immediately following the Installed browser packages via Bower. message I see:
Package ember-cli/ember-cli-test-loader=ember-cli/ember-cli-test-loader not found
I can't find any information on this directly. I've tried installing the various packages themselves, before the ember-cli-mocha package via npm and bower, but I always get that message when installing ember-cli-mocha through ember-cli.
Anyone else have experience with this? Thanks in advance!
I'm trying to roll back to v1.0.0-beta.16 after having used v1.0.0-beta.17.
I uninstalled version .17 and installed version .16, which seems to have worked according to npm:
$ npm list --depth=0
...
├── ember-data#1.0.0-beta.16
...
But when I run ember it still seems to use version .17 according to the Chrome console:
Any ideas?
You should change the version in both package.json and bower.json files. Bower stands for managing your plain JS or CSS assets and ember-data is one of them. On the other hand, npm packages will need ember-data and specify it in your package.json also. Just always remember to change versions of plain JS files in both of them.