Ember CLI - the Ramcat way

Ok, so much talk about Ember CLI. I am trying to write my animal husbandry application in Ember again - so why not try what they say will be the future. Here I will enumerate all the problems I run into.


#1 Installing Ember - Getting Started - Ember Guides On this page the order of the instructions is backward. It says Ember is installed via NPM, here are the NPM commands. Then later on the page is the link to Node and NPM.

I suggest you start with the order needed (and by needed I mean the order necessary in reality). You must have Node and NPM installed before executing those commands.

#2 The above mentioned commands are:

npm install -g ember-cli

npm install -g phantomjs

with no reference as to where to execute those commands from and nothing to tell me where the files are going to go.

I suggest you tell the user what changes that will make to their computer. Right now I am stuck trying to rewrite my app because I can’t figure out where these commands will dump files on my machine.


Just so you know how I work:

All applications are installed under C:\Apps\[App Name]\

And code projects are under D:\Projects\[Technology]\[Project Name]\

On *nix you can do this to see where global packages will be stored:

npm config get prefix

To change this path one can do:

npm config edit

Change prefix = /path/to/your/global/modules/prefix

I think the docs could simply link to npm docs for that information: https://docs.npmjs.com/files/folders

Edit: I have no idea if those commands work the same on Windows; see the above link. But I would recommend you do not store your global modules under D:\Projects\etc as the point is for them to be globally accessible across projects (and perhaps even technologies).

Ack! By default that wants to install in C:\Users\[User Name]\AppData\Roaming\npm. That’s a breach of decades old Windows rule: Never install anything you want to keep in the user profile.

Where is a safe place to put these files?

@brian_ally Thanks for the quick reply.

@Ember team - clearly should have some not about this in the docs, no GOOD developer would just trust you and run those commands blindly.

Development on windows is generally an afterthought for many JavaScript developers nowadays.

1 Like

I hear that on the web, but IRL I have only met one developer ever (my entire professional career) who did not use windows as his primary machine. I seriously do not know of anyone (save the above mentioned) who doesn’t develop on windows and I spent 10 years as a consultant in new shops every six months to a year. My last 13 years after leaving consulting have all been Windows. Of course, I know lots of artists who use IOS and many of them do HTML and CSS (but not JavaScript).

I’m not defending it. But at EmberConf, it seemed to me everyone had a MacBook. The one guy I saw with an oversized Alienware laptop was doing his dev on a Linux VM. Anyway, didn’t want to start an argument, my comment was more of a lament.

No,no, I get the lament. I have developed shrink-wrapped software for both Windows and Mac and took great pains to have my Mac install do it the “Mac” way, so Mac users would know where to expect their files. I wish node would respect Windows rules - no way permanent files should ever be under a user account directory. If windows has a glitch it kills my software.

#3 Apparently altering the .npmrc file does not cause NPM to install in the altered location (yes I rebooted after altering it so I was sure it had to load the new file). NPM installed ember-cli and phantomjs in C:\Users\[User Name]\AppData\Roaming\npm\node_modules (the default location).

Ember failed creating a project so I am deleting everything and doing it verbatim from the Ember docs.

Edit: Verbatim install caused an error:

D:\Projects\HTML>ember new BreedingPlanCalculator
version: 0.2.1
  create .bowerrc
  create .editorconfig
  create .ember-cli
  create .jshintrc
  create .travis.yml
  create Brocfile.js
  create README.md
  create app/app.js
  create app/components/.gitkeep
  create app/controllers/.gitkeep
  create app/helpers/.gitkeep
  create app/index.html
  create app/models/.gitkeep
  create app/router.js
  create app/routes/.gitkeep
  create app/styles/app.css
  create app/templates/application.hbs
  create app/templates/components/.gitkeep
  create app/views/.gitkeep
  create bower.json
  create config/environment.js
  create .gitignore
  create package.json
  create public/crossdomain.xml
  create public/robots.txt
  create testem.json
  create tests/.jshintrc
  create tests/helpers/resolver.js
  create tests/helpers/start-app.js
  create tests/index.html
  create tests/test-helper.js
  create tests/unit/.gitkeep
  create vendor/.gitkeep
Installed packages for tooling via npm.
git is not installed or not in the PATH
Error: git is not installed or not in the PATH

Is this fatal? Can I fix this (I don’t want git)?

It’s fatal :frowning:

D:\Projects\HTML\BreedingPlanCalculator>ember server

Missing bower packages:
Package: jquery
  * Specified: ^1.11.1
  * Installed: (not installed)

Package: ember
  * Specified: 1.10.0
  * Installed: (not installed)

Package: ember-data
  * Specified: 1.0.0-beta.16
  * Installed: (not installed)

Package: ember-resolver
  * Specified: ~0.1.14
  * Installed: (not installed)

Package: loader.js
  * Specified: ember-cli/loader.js#3.2.0
  * Installed: (not installed)

Package: ember-cli-shims
  * Specified: ember-cli/ember-cli-shims#0.0.3
  * Installed: (not installed)

Package: ember-cli-test-loader
  * Specified: ember-cli-test-loader#0.1.3
  * Installed: (not installed)

Package: ember-load-initializers
  * Specified: ember-cli/ember-load-initializers#0.0.2
  * Installed: (not installed)

Package: ember-qunit
  * Specified: 0.2.8
  * Installed: (not installed)

Package: ember-qunit-notifications
  * Specified: 0.0.7
  * Installed: (not installed)

Package: qunit
  * Specified: ~1.17.1
  * Installed: (not installed)

Run `bower install` to install missing dependencies.

“bower” is also not recognized on my system.

Do the CLI docs really not mention Bower as a dependency? That looks like an oversight that should be fixed. Personally, I’m coming to Ember after working with Node, Angular, Express, and a whole lot of other stuff, so all of the major dependencies were already installed. So it seems like an understandable oversight, fwiw.

Did you see the link at the bottom of the page to the installer for Windows?

Also personally, I haven’t had Windows installed on my main development box since approximately 2002. Not even dual boot. I don’t think that’s extraordinary.

The documentation I am running from is Installing Ember - Getting Started - Ember Guides and “bower” is not found on the page at all.

Ok, Ember team check this to see if it is correct: The proper order of things to install if you’re starting a windows machine from scratch.

  1. Git (best option I can find is “GitHub for Windows”).
  2. NodeJS (includes NPM).
  3. Bower (npm install -g bower).
  4. Ember-CLI (npm install -g ember-cli).
  5. Phantom JS (npm install -g phantomjs).

Note: all of the NPM installed modules are stored in you user directory so are subject to Windows fragility. If your profile has a problem so will all those dependencies, presumably these could actually be installed in safe directories outside of Windows control but that is beyond my skill at the moment.

Then you should be able to run “ember new app-name” from the parent directory to where you want the app/project/folder named “app-name” to be created.

I will install git and bower - delete my failed project directory and retry for number 3.

Because I want to understand, what languages do you code in? Personally I have put code into production software in 21 languages (I am counting VB3, 4, 5 & 6) as distinct languages, because they were each crossing new boundaries (maybe not so much for 5 & 6 except that I was doing structured error handling in 6 and inheritance which I could not do in 5). And yes inheritance and structured error handling were not common or easy in VB6.

You should not need git, could you please open an issue at Issues · ember-cli/ember-cli · GitHub, so we can track down who/what is using git and fix this?

npm install -g bower

Bower’s site says it needs git. I installed per these instructions Installing Ember - Getting Started - Ember Guides which does not include bower and got the “git” error. So in light of Bower’s site claiming it needs git should I open an issue?

bower really shouldn’t be required to be installed globally, ember new and ember init both use the internal bundled version. But at this point, after the git error neither ember new or ember init would recover.

Hmmmm… trying to delete the folder D:\Projects\HTML\BreedingPlanCalculator causes multiple errors about file names too long.

I don’t have a github account, so as of now I cannot.