I've installed zsh with homebrew and changed my shell to it. I'm having a problem when trying to run the gulp
command, which worked before I changed the shell to zsh.
zsh: command not found: gulp
A bit of research leaves me to believe it has something to do with my PATH. My PATH looks like this is my .zshrc
file.
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
I want to say I installed node with brew. How can I use gulp with zsh without changing back to the default shell?
Any help is appreciated. Thanks in advance!
The problem might be caused by your global npm directory being set to the wrong location. The global npm directory is where your packages get installed when you install them globally. You can check where it is by typing in npm root -g in the command line.
First run npm -g install gulp-cli then run gulp -v. Alternatively, you can just run npm list gulp.
To install the Gulp CLI globally, on your command line, run npm install gulp-cli -g . The -g flag means npm will install the package in the global npm directory, so you can run the gulp command from any directory.
I did sudo npm install gulp -g
, typed in my password, and after installing it worked for me.
Though this is an old post, but none of the above solutions were working for me (Catalina 10.15.3). So basically issue with me wasn't about installing the gulp but not proper linking.
Commands I ran are:-
npm config set prefix /usr/local
npm link gulp
Hope this help anyone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With