browserify error /usr/bin/env: node: No such file or directory

后端 未结 9 602
盖世英雄少女心
盖世英雄少女心 2020-11-29 17:17

I installed node js and npm via apt-get install and all of the dependencies, then I installed browserify

npm install browserify -g

it goes

9条回答
  •  独厮守ぢ
    2020-11-29 18:14

    Some linux distributions install nodejs not as "node" executable but as "nodejs".

    In this case you have to manually link to "node" as many packages are programmed after the "node" binary. Something similar also occurs with "python2" not linked to "python".

    In this case you can do an easy symlink. For linux distributions which install package binaries to /usr/bin you can do

    ln -s /usr/bin/nodejs /usr/bin/node
    

提交回复
热议问题