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_modulesfolder in the project
npm cache clean
- Delete the
bower cache clean
The issue seems to stem from conflicting dependencies between
bower. Running those commands in the exact order resolves that conflict.
Other Windows Resources
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.
ember-cli website has a great section on windows I recommend installing the ember-cli-windows-addon and the ember-cli-windows packages as the guide suggests. Running these packages will exclude your project folders from being watched by windows defender and windows search.
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.