Sublime Forum

Errno 2 No such file or directory: ng

#1

Mac OS user, when trying to use angular CLI I get the following error. I can’t find where to set the path in this package to point to /usr/local/lib/node_modules/@angular/cli/bin.

[Errno 2] No such file or directory: ‘ng’
[cmd: [‘ng’, ‘help’]]
[dir: /Users/admin/Downloads/angularjs-get-started]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

I have tried creating and alias and adding the above directory to /etc/paths.d/

Can anyone tell me where sublime might be taking the $PATH variable, as it doesn’t seem to be coming from my .bash_profile or the global /etc/paths.

1 Like

#2

Sublime Text grabs the environment variables from the login shell at startup. Have you restarted Sublime Text since changing your .bash_profile? Is your login shell bash?

0 Likes

#3

You seem to be using macOS.

Depending on your default shell, edit: ~/.profile (bash), ~/.zprofile (zsh) or ~/.config/fish/config.fish (fish).

0 Likes

#4

Thanks for the replies. I did try that, but was starting sublime from the Application folder. It seems to use the correct path if I start sublime from a command line window (would that ensure that the profile of the terminal is being passed through?).

1 Like