How to use executables from a package installed locally in node_modules?

前端 未结 22 2133
时光说笑
时光说笑 2020-11-22 12:40

How do I use a local version of a module in node.js. For example, in my app, I installed coffee-script:

npm install coffee-script
22条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 13:16

    zxc is like "bundle exec" for nodejs. It is similar to using PATH=$(npm bin):$PATH:

    $ npm install -g zxc
    $ npm install gulp
    $ zxc which gulp
    /home/nathan/code/project1/node_modules/.bin/gulp
    

提交回复
热议问题