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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -