Martin Andersen Martin Andersen - 1 month ago 5
Bash Question

echo %PATH is not working on macOS

When I type echo %PATH it returns %PATH why?
The reason I am asking is because npm installations works fine but my packages are not in the path.

I have installed Ionic with npm i -g ionic and I can se the lib in /Users/mha/.npm-packages/lib/node_modules but when I write ionic -v I get a unknown command back.

Answer

In *nix systems, environment variables are preceded by a $, not a %.

You should try a echo $PATH