error with ionic 5 during building with cordova-plugin-hms-push 5.1.1-301
casper5822 opened this issue · comments
Hello i have a ionic 5 app with this pluging version:
"@hmscore/cordova-plugin-hms-push": "^5.1.1-301",
"@hmscore/ionic-native-hms-push": "^5.1.1-301"
When i make ionic build i geth this is the error:
ERROR in ./node_modules/@hmscore/cordova-plugin-hms-push/ionic-native/index.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /var/www/html/triptrainer/ionic/TripTrainer/node_modules/@hmscore/cordova-plugin-hms-push/ionic-native/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (/var/www/html/triptrainer/ionic/TripTrainer/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:949:23)
at plugin.done.then (/var/www/html/triptrainer/ionic/TripTrainer/node_modules/@ngtools/webpack/src/loader.js:43:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
@ ./src/app/shared/service/mqttClient.service.ts 9:0-86 241:12-19 242:12-24
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi ./src/main.ts
[ERROR] An error occurred while running subprocess ng.
Can you help me?
Thank you
Ok the problem was the import.
If you import the class with this:
from '@hmscore/cordova-plugin-hms-push/ionic-native/;
you get the error.
If you import with this:
from '@hmscore/cordova-plugin-hms-push/ionic-native/dist/ngx';
It works.