I am developing several Ionic 2 utility apps that share functionaility such as authentication services and keypad components and naturally want to separate these out into a shared module.
The plan has been to use npm link to ease concurrent development of the shared module and the apps. However, I have run into issues when trying to build and run my Ionic app which could either be due to improper structure of my shared module or build tool config.
Essentially I get one of the the two following error messages depending on whether my shared module is using forRootr():
Error: Unexpected value '[object Object]' imported by the module 'AppModule'
or
Unexpected value 'Appkit' imported by the module 'AppModule'
I have a more detailed write up of the issue over in this stack overflow question.
Does anyone have experience with a npm component library in Ionic 2 RC1
Your system information:
Cordova CLI: 6.4.0
Gulp version: CLI version 1.2.2
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.38
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a