Closed shanehh closed 4 years ago
@huulien Please check if your global node_modules/.bin
is presented in $PATH
Take yarn as an example, $HOME/.config/yarn/global/node_modules/.bin
should be added to PATH
.
@huulien Please check if your global
node_modules/.bin
is presented in$PATH
Take yarn as an example,
$HOME/.config/yarn/global/node_modules/.bin
should be added toPATH
.
It looks like not being installed correctly, I dont know..
❯ whereis nodemon
nodemon: /home/me/.nvm/versions/node/v13.1.0/bin/nodemon
❯ whereis forever
forever: /home/me/.nvm/versions/node/v13.1.0/bin/forever
❯ whereis nali
nali:
❯ ls /home/me/.nvm/versions/node/v13.1.0/bin/
forever koa koa2 node nodemon npm npx
@huulien You might have your nvm configured incorrectly. Try the command to see if global node_modules
is presented in the PATH:
echo $PATH | grep "node_modules/.bin"
@SukkaW Sorry, I forget how I installed my nvm. Nothing had been displayed when I entered echo $PATH | grep "node_modules/.bin"
.
I tried some other CLI apps like svgo, and they could work as expected. But I noticed that the given info is diff from nali's during package installing.
Installing of svgo:
❯ npm install -g svgo
/home/me/.nvm/versions/node/v13.1.0/bin/svgo -> /home/me/.nvm/versions/node/v13.1.0/lib/node_modules/svgo/bin/svgo
+ svgo@1.3.2
added 52 packages from 82 contributors in 4.699s
❯ svgo -v
1.3.2
Installing of nali:
❯ npm install -g nali
+ nali@1.1.4
added 6 packages from 7 contributors in 0.609s
❯ nali -v
zsh: command not found: nali
There is no /bin
dir?
❯ ls /home/me/.nvm/versions/node/v13.1.0/lib/node_modules/nali/
block.js index.js LICENSE.md node_modules notes.md package.json README.md service.js test
nali-cli not nali
I mean npm install -g nali-cli
not npm install -g nali
I installed nali with
npm -g
. But I had no idea that every global package as follows can work well except the nali.