npm i -g ionic@latest
or
sudo npm i -g ionic@latest
if i run command, catch some error, like this:

how to resolve it?
@smallg You're getting permission errors for /usr/local/lib/node_modules. This is not an ionic issue, but an issue with your npm setup. See the npm docs: https://docs.npmjs.com/getting-started/fixing-npm-permissions
You can also do the following:
sudo chown -R $(whoami):staff /usr/local/lib/node_modules
This will change the directory owner to be your personal account. Then, never use sudo with npm.
@dwieeb it works for me, thanks.
i can't create project in ionic 4.Some errors are occurred. I can't understand is anyone can help me..?

please help me...
@MiluMaria Please create new issues. That's not the same issue. Also, your CLI is out of date.
Most helpful comment
@smallg You're getting permission errors for
/usr/local/lib/node_modules. This is not an ionic issue, but an issue with your npm setup. See the npm docs: https://docs.npmjs.com/getting-started/fixing-npm-permissionsYou can also do the following:
This will change the directory owner to be your personal account. Then, never use
sudowithnpm.