I have installed up to date version of node using:

curl -s -O sudo apt-get install rlwrap sudo dpkg -i nodejs_5.7.1-1nodesource1~trusty1_amd64.deb 

There after I installed yo using

 npm install -g yo 

But when I try it out, I get an error that says:

zsh: command not found 

With echo $PATH,

/usr/local/heroku/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games 

How can I get this working ? I am very new to Ubuntu and pretty clueless about it.

3 Answers

I solved the

zsh: command not found 

issue for the npm libraries by setting the path in ~/.zshrc

Setting the following path in ~/.zshrc solved my issue

echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc 
1

This script works for me. You have to add it at the end of ~/.zshrc.

if [ -d "$HOME/.nvm" ]; then # export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" export NVM_DIR="$HOME/.nvm" # This loads nvm [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm bash_completion [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" fi 

zsh is a alernative to your bash shell.

You installed yeoman for node. ()

To install zsh you can do so like this:

sudo apt-get update && sudo apt-get install zsh 

and then type zsh to get started with zsh.

If you like zsh you should look into oh-my-zsh for some nice terminal themes and plugins.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy