Issue installing addon in ember cli - ember.js

I am on 0.1.4 of ember-cli and tried installing an addon:
ember install:addon ember-cli-simple-auth-cookie-store
but I got the error:
The specified command install:addon is invalid, for available options see ember help.
How can I go about installing this addon please?

Check the Installation Instructions for Ember CLI 0.1.4 and older: https://github.com/simplabs/ember-cli-simple-auth-cookie-store#installation

Related

Error while creating new ember application using ember-cli

I installed ember-cli tools, When i tried to create a new application using ember new book-app i get the following error
installing app
......
create tests/unit/.gitkeep
create vendor/.gitkeep
Successfully initialized git.
Installed packages for tooling via npm.
Error creating new application. Removing generated directory `./book-app`
Package ember not found
Error: Package ember not found
at createError (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/util/createError.js:4:15)
at /usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/core/resolverFactory.js:206:23
at _fulfilled (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/node_modules/q/q.js:796:13)
at /usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/node_modules/q/q.js:604:44
at runSingle (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/node_modules/q/q.js:137:13)
at flush (/usr/local/lib/node_modules/ember-cli/node_modules/bower/lib/node_modules/q/q.js:125:13)
at nextTickCallbackWith0Args (node.js:419:9)
at process._tickCallback (node.js:348:13)
I am not sure what the problem is. I am using ember-cli 2.7.0
Since no answer was provided and I just ran in to this exact error. What worked for me was to reinstall bower.
npm rm -g bower
npm install bower -g

New Ember App with Ember 1.12.2

i want to build a new Ember CLI App with the Command: Ember new demo-app.
The Problem is, that i need Ember 1.12.2 and not the newest one.
How can i create an App with Ember 1.12.2?
Thanks a lot
Install ember-cli 0.2.7 globally
ember new demo-app
Edit your bower.json so that ember is 1.12.2 and ember-data is 1.0.0-beta.19.2
bower install
Edit your package.json so that ember-data matches version in bower.json
npm install
ember s
(Optional, but it will improve performance): Upgrade your project's ember-cli version as much as you would like to attempt. (expert step, unfortunately) (Technically it is possible to get all the way to ember-cli 2.5)
I usually use the 1.13 version from Ember CLI and downgrade Ember version to 1.12.2 in bower. It works smoothly.

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 to upgrade the Ember version in an Ember CLI application?

Assuming I created this Ember application last week:
ember new shop
cd shop
ember install:addon ember-cli-scaffold
ember g scaffold product name:string
The console tells me that this application uses Ember 1.10.0:
How can I upgrade this Ember application to Ember version 1.11.0?
The syntax has been updated to:
bower install ember#2.0.0 --save-dev --save-exact
#Sukima's answer will work fine, but you can also use the ember-cli command:
ember install:bower ember#<version>
In your case, upgrading to Ember 1.11.0 would look like this:
ember install:bower ember#1.11.0
Source: http://www.ember-cli.com/#using-ember-cli
Update the version in your bower.json file and run
bower install
From ember-cli 2.11 version, ember is served from npm package, so you need to update ember-source version number in package.json
"ember-source": "~2.11.0"

How to replace the handlebars with htmlbars in Ember CLI app?

I am facing the following issue after upgrading the Ember and Ember data to the canary versions.
Cannot set property 'compilerInfo' of undefined
I found the discussion about the issue in Ember CLI repo.
https://github.com/ember-cli/ember-cli/issues/2955
The solution is to replace handlebars with htmlbars. But I don't know the exact steps to do that.
I checked handlebars repo. It gives code snippets but I don't know where to place the code exactly.
Any idea?
You will still be using Handlebars, but you need 2.0.
For HTMLBars, what you'll change is the template compiler.
npm uninstall --save-dev broccoli-ember-hbs-template-compiler
npm install --save-dev ember-cli-htmlbars
rm -rf bower_components
bower install --save handlebars#2.0.0
bower install