node.js - How to use npm module with Brunch -


i'm using brunch.io , i'm trying use npm module (https://github.com/dylang/shortid in case) in client side. shortid says it's compatible browserify, tried many things including

  • browserify module following command:

    browserify -r ./index.js:shortid > /project/vendor/shortid.js 
  • and use in application code:

    var shortid = require("shortid");  

web page giving following error:

 typeerror: require.register not function  typeerror: loaderpath.indexof not function 


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -