Issue
I recently got a mac mini with an m1 chip and tried to install my environment. So far I've managed to install node/npm and Homebrew correctly and the commands work. The problem begins when I try to install Ionic globally. In reference to this documentation, https://ionicframework.com/docs/intro/cli, I proceed to enter the command:
npm install -g @ionic/cli
The installation process works. Immediately after I run:
ionic start
And then I get this error: zsh: command not found: ionic I think it has to do something with my paths, but I can't seem to figure it out. Here is the error I'm referring to on terminal
Solution
So continuing from the first response, my search ended up in node version manager. Here I managed to install nvm and switch between node versions. I used this video as reference how to install and use nvm.
I installed ionic again npm install @ionic/cli and it works!
The only issue I encountered is when I close out my terminal and reopen it again, nvm points to my system version of node and ionic doesn't work anymore. It begins working again once I use nvm and switch to the most recent version of node.
Here is an image when ionic doesn't work and when it does work.
UPDATE: Managed to fix the issue at the end. I ended up making nvm switch to the most recent version of node and also made it the default setting. I also went ahead and removed the system version of node.
Answered By - iamconfusion
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.