0

This might actually more npm/node than just an EmberJS question.

Simply speaking I ran npm install -g ember-cli. However, when I check the version using ember --version, it shows me

ember-cli: 3.10.1 node: 18.18.2 os: darwin x64 

That is definitely not the version I installed, because if i do npm ls -g --depth=0 to check my global packages, I get:

├── [email protected] ├── [email protected] └── [email protected] 

To sanity check, i ran npm uninstall -g ember-cli and running npm ls -g --depth=0 again got

├── [email protected] └── [email protected] 

So now, confirming that the global package is removed, I ran ember --version expecting the system to say ember is not installed, but instead i still get:

ember-cli: 3.10.1 node: 18.18.2 os: darwin x64 

This leads me to believe there is some other installation of Ember on this computer and it's being used instead of the global version and I'd really like to just remove it - how do I find and remove it?

Useful context may be: I use NVM and Brew, although even in the past I didn't attempt to install ember with anything but the official installation direction of npm install -g ember-cli.

1 Answer 1

1

a few tools in the npm ecosystem defer to local installations when installed globally, because that's usually what you want to be working with.

If you have a local package.json, I'd check in your current working directory and remove or upgrade ember-cli from there.

other things to check, since you mentioned nvm -- you may have multiple node/npm installations (system, and then one managed by nvm) -- it may be useful to temporarily modify your .bashrc/.zshrc and comment out the nvm lines, and then open a new shell, and see what's installed there -- if ember-cli is present, that could explain the behavior you're seeing.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much! This led to the solution - I had these lines in my .zshrc export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm Which I believe is from an old installation of nvm. I commented it out, and ran source ~/.nvm/nvm.sh, as per direction in nvm. and it switched over to the latest ember-cli globally installed. I added the line source ~/.nvm/nvm.sh to .zshrc as directed here: stackoverflow.com/questions/16904658/… and now nvm also runs each time.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.