Menu

Ember: Windows Install Hell

Yesterday I was helping a coworker get an ember-cli app running on their system and ran into a strange issue that was preventing ember serve from correctly building the project. Here is an example of the error we were seeing:

ENOENT, no such file or directory 'C:\project\tmp\concat_with_maps-input_base_path-tfPGUnEW.tmp\0\ember-cli-content-security-policy.jsC:\project\tmp\concat_with_maps-input_base_path-tfPGUnEW.tmp\0\ember-cli-content-security-policy.js'

As you can see that file path looks very strange and actually has the path written twice. This machine was starting from scratch and we had just installed node, npm, and the rest of the toolchain. We attempted to nombom the folder and start over again but still got the same error. Eventually we found a similar issue on stackoverflow and of the comments had a suggestion that worked.

Delete the node_modules folder in the project

Run npm cache clean

Run npm install

Delete the bower_components folder

Run bower cache clean

Run bower install

The issue seems to stem from conflicting dependencies between npm and bower. Running those commands in the exact order resolves that conflict.

Other Windows Resources

Running ember-cli on windows at the moment would probably put you in the minority of the user base. Personally I have run into plenty of issues and when first starting had a pretty slow build/watch experience. Here are some useful things I have found across the docs.

Some of the biggest improvements I got from the guide were enabling symlinks for all users on my machine and running my ember serve process as administrator.

The guide also suggests, with some caution, installing npm v3 but as of writing this I am still experiencing issues on windows 10. Still is a good idea to keep the npm-windows-upgrade tool around for easy switching between versions.

For a more in depth overview I recommend reading over the entire windows guide on the ember-cli website and this blog post by Felix Rieseberg who has done most of the additional windows tooling projects.