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

前端 未结 22 1925
时光说笑
时光说笑 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 12:59

    I am a Windows user and this is what worked for me:

    // First set some variable - i.e. replace is with "xo"
    D:\project\root> set xo="./node_modules/.bin/"
    
    // Next, work with it
    D:\project\root> %xo%/bower install
    

    Good Luck.

提交回复
热议问题