I have the following configuration in my package.json :
"browser": {
"ui-bootstrap-tpls": "./node_modules/angular-ui-bootstrap/ui-bootstrap-tpls.js"
},
"browserify": {
"transform": ["browserify-shim"]
},
"browserify-shim": {
"ui-bootstrap-tpls": "ui-bootstrap-tpls"
}
In my Javascript I have :
require('ui-bootstrap-tpls');
But I get this error while generating browserifybundle :
cannot find module : ui-bootstrap-tpls
I do not have control over the library where the require call is made for 'ui-bootstrap-tpls'
Please help, I can confirm that the path to the ui-bootstrap-tpls.js exists.
First of all, it seems like you just want to install the Angular UI Bootstrap module, not just that file. If that's the case, you should just delete your Browserify Shim directives from your
package.jsonand tryrequire('angular-ui-bootstrap)` in your code. You haven't explained why you actually want just that particular file vs. the entire package so it isn't straightforward to help you.If you've installed Angular UI bootstrap via
npm install angular-ui-bootstrapthe path would be as follows:node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js. You've omitted thedistfrom the path...has someone hacked the contrib module or do you just need to change that part of yourpackage.json?Last - the package's
maindirective isindex.jsnotui-bootstrap-tpls.jsso it's odd that you would have to require just that file. Something isn't right here.