DEV Community

Cover image for ember-cli is stuck on certain version
Michal Bryxí
Michal Bryxí

Posted on

ember-cli is stuck on certain version

Today when bootstrapping new EmberJS project I encountered weird headscratcher:

> npx ember-cli@5.2.1 new sandbox --skip-npm --skip-git
Ember CLI v4.2.0
🎉  Successfully created project sandbox.
Enter fullscreen mode Exit fullscreen mode

Wut? Why does it say Ember CLI v4.2.0 when I explicitly asked for 5.2.1? Let's see what project was created:

> cat sandbox/package.json | grep ember-source

    "ember-source": "~4.2.0",
Enter fullscreen mode Exit fullscreen mode

Hmm? So really v4.2.0, but why?

[Few confused debugging attempts later]

The problem turned out to be in the folder where I was working. For some reason I had node_modules folder there. And that folder happened to have ember-cli@4.2.0. There was no good reason for that folder to exist so I just deleted it and things started working as expected.


If you request ember-cli of one version and get output of other version, then check that your current working directory does not contain node_modules folder with the incorrect version inside.

Image generated via Midjourney prompt: Two spiderman pointing at each other; Hand drawn; Sketch; Simple --ar 16:9

Top comments (0)