Some utilities like "sugarjs" I have installed globally on my computer with
npm install sugar -g
However when I try to require sugar in a browserify file it wont work unless I install it locally. This works fine in my node servers, but i'd prefer not to install sugar again for each of my projects.
Is it possible to require files from the global node_modules folder with browserify?
You can add something like this to your package.json
to tell browserify where to find certain modules:
"browser": {
"sugar": "/usr/node_modules/sugar/index.js"
}
(Adjust exact filepaths to your system.)