-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatch between global vs. local ember version #4451
Comments
We basically do what you outline in the last bullet point. Both in CI and development, we make sure So far that's worked pretty well for us, though I'm not sure I understand your point about it forcing a reinstall. What do you mean about it breaking module caching? |
ember cli apps, ship with:
https://github.com/ember-cli/ember-cli/blob/master/blueprints/app/files/package.json#L10-L14 Which will automatically resolve so the approach you can take that will work 100% of the time without modifying the path is as follows:
|
👍 That's great to know; didn't realize the stuff in the |
Thanks, I didn't know that. It's missing the "bower install" step, though. I guess this would help with CI issues, although for local development you'd probably still have to modify your path in order to execute "ember generate" etc. Is this documented somewhere? If not, I think this should be added. ember-cli-dependency-checker advises to do the following on CI servers:
I'm guessing this is because some CI servers might be caching the node_modules folder between builds? But then again, this solution cannot really work if ember-cli is upgraded, because "ember version" will be run by a potentially wrong version of ember-cli? Is it advisable then to just always delete the node_modules folder? |
Only guess, or does it?
In local development, the suggested practice is to have a globally installed
that is strange advice.
I would recommend never caching this, npm v2 does not correctly maintain node_modules in many scenarios. npm V3 does solve many of the issues though. Lets see how it plays in the wild once stable lands.
yes, until such time that NPM actually works as expected. |
It does, although I need to delete the node_modules folder first - otherwise I run into strange problems with caching, as you mentioned.
Then I suggest dropping that line from the README, because it's very confusing. Thanks for the advice. Seems npm is more broken than I imagined 😞 |
If you have suggestions for the dep checker I would suggest opening an issue on that repo |
In going to close this. Some of these issues are fixed in npm v3, once that lands in stable nicer things will be possible. Until then we can't really do much more :( |
Thanks for the feedback. I will raise an issue in the dep checker repo. I think it would be nice if the pitfalls / steps discussed in this issue could somehow find their way into the documentation because I imagine other people might be as confused as I was. |
This is an issue that surfaced on our CI server after adding npm-shrinkwrap.json to the repository.
ember install -g ember-cli
, as far as I understand it, installs the most recent ember-cli version. However, if this version does not match (e.g. is newer than) the ember-cli version specified in the shrinkwrap file, ember will refuse to execute any commands. This means that I cannot execute the tests on the server. I see a couple of potential solutions:npm install && bower install && .node_modules/ember-cli/bin/ember test
. This would probably work, although it would preclude more clever solutions relying on potentially cached modules, such asember version || (rm -rf node_modules/ bower_components/ && npm install && bower install)
. It also does not prevent similar issues arising on different developer machines.I could be missing some obvious, better solution. Any thoughts?
The text was updated successfully, but these errors were encountered: