I have a problem on npm installation
I have created a project say project A
cd ~/projectA
npm install sails
but sails command is not fo
In my ~/.bashrc
, I have the following:
function nbin {
local dir;
dir=$(npm bin)
if [ -d "$dir" ]; then
( # subshell to not change this shell's $PATH
PATH=$dir:$PATH
eval "$@"
)
else
echo "\"$dir\" is not an npm binary directory." >&1
return 1
fi
}
I can then run executable foo
in the .bin
directory as:
nbin foo