DEV Community

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

Posted on

2

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.

Conclusion

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

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series