Good evening all,
Is there exists an Ember CLI Version switcher?
I do not yet tested this but for example this is a node.js version switcher.
Background for my bit strange question is the problem by working on ember projects with different versions like 2.13, 3.0 or 3.5. Locally only one node.js version can be installed on my computer. The same think its with the related installed Ember CLI version.
On my home I working with windows 10 and not with linux.
One solution for my problem is that I try to use docker with this project: https://hub.docker.com/r/danlynn/ember-cli/
But the problem here is that apparently docker under windows have a little problem by watching file changes. If I change a file then the running ember app inside the docker container do not make an refresh. A manual stop and restart of my ember app is needed inside the docker container. This is only a problem under windows. I discussed this with an issue on the github project.
Therefore my question whether there exists an version switcher for Ember and Node.
Just wanted to note that ember-cli will always use the project local version, so having a global ember-cli that’s at version 3.5 (for example) when working on a project that is using firstname.lastname@example.org it will use 3.4 in that project.
I’m sorry but I don’t know much about the node version switcher situation on windows other than to know: they do exist…
I’ve had a lot of issues with Docker for Windows, as well. Instead, I recommend enabling Windows Subsystem for Linux, and installing Ubuntu.
I have had good success with coreybutler/nvm-windows for switching node versions on Windows. It is not quite as ergonomic as regular nvm, but it gets the job done. The main “gotcha” is that it needs to be run from a vanilla
cmd.exe (or maybe PowerShell – but definitely not Git BASH, for example) as an administrator.
- Uninstall any stand-alone version(s) of node installed already
- Install latest nvm-windows release
- Open command prompt as administrator & run
nvm install 10.13.0 then
nvm use 10.13.0 (you can repeat this step later to change versions)
- Now you should be able to run
npm -v, etc. and see the expected versions. Note that whenever you switch node versions you’ll need to reinstall packages (there is basically a symbolic link at, for example, “C:\Program Files\nodejs” that gets changed)
As for switching
ember-cli versions, as rwjblue already mentioned, it’s rarely needed. Occassionally I find myself doing it in order to be able to create a new repo with an older version in order to reproduce a problem. I typically just run
npx email@example.com new ... to use it for a one-off case. Otherwise you can do
npm install -g firstname.lastname@example.org to use that version indefinitely (for new projects – as noted, this should not have any effect on existing projects).