Ember 2 CLI - installing

emberjs

#1

I’m rather new & trying to get the new Ember.js CLI 2 to the c9.io projects.

The user guide posted here (Link) is outdated & gives you the non-CLI version. When you run it, the splash page of your new project says you should goto the CLI page (Link), which in turn asks me to run:

npm install -g ember-cli@beta

Should I just select node.js & then use the NPM to install it?

My concern is I don’t want a ton of extra files laying around in the node.js template that Cloud9 serves up - especially if per other stackoverflow posts - there’s an issue with this in other versions of ember.js.

Normally, I post questions after I’ve spent several hours fighting - but figured I would write this & then go back to the process of making everything work.

Also, if someone has a link to grabbing ember.js 2 cli from github or bitbucket - would love to see them!

Thanks!


#2

I’m not sure I am happy with how it is now (as my c9 folders are mess), but it mostly appears to work…

  1. Pick node.js to start up cloud9 (I imagine you could start a blank or load a github repo & use git/curl/bower to get the NPM into the c9 environment)

  2. Ember documentation has 3 start pages for the 2.0 CLI. I found this one later - Link

  3. I logged into the c9 & workspace folder. Then ran npm install -g ember-cli

  4. Following I ran npm install -g bower

  5. I wanted the trouble shooting help, so I then npm install -g phantomjs-prebuilt

  6. Lastly, I started the new project folder ember new my-new-app

Bonus:

At the bottom of the same page is how to copy anyone’s ember.js project for 2.0 CLI …

git clone git@github.com:me/my-app.git
cd my-app
npm install
bower install
ember server

#5

This one isn’t the best way anymore…yarn is replacing bower, but the process to convert is messy so best starting out with yarn instead… https://bower.io/blog/2017/how-to-migrate-away-from-bower/