I'm using bower, and as expected, bower install ngclipboard --save installs ngclipboard, and it's dependency, clipboard. However, when loaded with these tags:
WARNING: Tried to load angular more than once.
module.js:455 Uncaught Error: Cannot find module 'clipboard'
Referencing this code:
// Check for CommonJS support
if (typeof module === 'object' && module.exports) {
angular = require('angular');
Clipboard = require('clipboard'); //this line in particular
module.exports = MODULE_NAME;
} else {
angular = window.angular;
Clipboard = window.Clipboard;
}
If I install using npm, it all works, even if I keep the bower source tags.
The project has node packages in the same directory, including angular, which explains why the log says WARNING: Tried to load angular more than once. instead of something like module.js:454 Uncaught Error: Cannot find module 'angular'.
I'm using bower, and as expected,
bower install ngclipboard --save
installs ngclipboard, and it's dependency, clipboard. However, when loaded with these tags:It produces this in the console:
Referencing this code:
If I install using npm, it all works, even if I keep the bower source tags.
The project has node packages in the same directory, including angular, which explains why the log says
WARNING: Tried to load angular more than once.
instead of something likemodule.js:454 Uncaught Error: Cannot find module 'angular'
.