I am currently using the angularbknd-sdk in my Ionic 1 mobile app. I installed it with Bower, I loaded it as a npm module thanks to browserify-shym:
package.json
"backand": "./bower_components/angularbknd-sdk/dist/backand.min.js"
then I injected the 'backand' module as a dependency of my app :
app.js
require('backand');
angular.module('myApp', ['backand'])
This works like a charm.
But now I would like to use the new Backand angular-sdk, and load it from NPM instead of Bower.
This is what I did :
I removed angularbknd-sdk from bower, from my package.json and the require('backand') line from my app.js.
Then,
I did :
$ npm i -S @backand/angular1-sdk
and I put this line in my app.js :
require('@backand/angular1-sdk');
But when I run my app, I got this error in the javascript console :
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.3/$injector/modulerr?p0=app&p1=Error%3A%20%…%2Fandroid_asset%2Fwww%2Flib%2Fionic%2Fjs%2Fionic.bundle.min.js%3A54%3A463)
What am I doing wrong ?
Thanks in advance.
Without more detail on the exact line that is failing it is hard to tell exactly what is not functioning properly, but this looks like it is missing an ionic include. I would check to make sure you have no occurrences of the Ionic JavaScript SDK in your vendor folder, and that the existing SDK has no files remaining in your project - it is possible that there is an include conflict if the physical javascript files for the old angular1bknd-sdk were not removed from the vendor folder managed by bower.