NPM : how to source ./node_modules/.bin folder?

后端 未结 8 1929
慢半拍i
慢半拍i 2021-02-19 14:23

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

8条回答
  •  星月不相逢
    2021-02-19 14:45

    A bit more robust is:

    export PATH=$(npm bin):$PATH
    

    You can either run it, add it to your shell profile, or create an alias like:

    alias snpm='export PATH=$(npm bin):$PATH'
    

    If you do go the alias route, be sure to use single quotes so it delays the execution of the variables!

提交回复
热议问题