ionic-pullup
ionic-pullup copied to clipboard
Not a known element
I use the latest version of release 4 (installed via: npm i [email protected])
But i always get the error:
'lib-ionic-pullup' is not a known element:
1. If 'lib-ionic-pullup' is an Angular component, then verify that it is part of this module.
2. If 'lib-ionic-pullup' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
</ng-container>
</ion-content>
So i guess something is wrong with the module registration. But i double checked it and it seems to be right in my opinion:
in the app.module.ts
i added the import:
import {IonicPullupModule} from 'ionic-pullup';
and then:
@NgModule({
declarations: [ .... ],
entryComponents: [ .... ],
imports: [
....
IonicPullupModule
],
exports: [TranslateModule],
providers: [ .... ] ,
....
})
export class AppModule {}
Can't use the latest version cause of angular 7 i guess? Cause i'm getting the following error:
ERROR in node_modules/ionic-pullup/lib/ionic-pullup.component.d.ts(80,9): error TS1086: An accessor cannot be declared in an ambient context.
I also tried to isntall the latest 3.0.1 Version and did some changes on the module (mainly only the imports for the ionic-angular.. (changed to @ionic/angular). Then the app build without errors but still getting the same issue but with the other component ion-pullup which was used in this version.
What i also checked was the ionic-pullup.metadata.json
file. There is definitely a selector for the pullup component defined:
.... ,"arguments":[{"selector":"lib-ionic-pullup","changeDetect ....
I am using the pullup component only on one page where i also added the import of the footer state:
import { IonPullUpFooterState } from 'ionic-pullup';
so any idea what i can do to get it working?
also here my ionic info:
Ionic:
Ionic CLI : 6.16.3 (C:\Users\xxxxxxxxxxxx\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 4.11.3
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.4.1
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 29 other plugins)
Utility:
cordova-res : not installed globally
native-run : 1.4.0
System:
NodeJS : v14.17.3 (C:\Program Files\nodejs\node.exe)
npm : 6.14.13
OS : Windows 10
I guess i got it... did some more search and finally found this: https://forum.ionicframework.com/t/ionic4-component-not-a-known-element/153169/11?u=b5518388
i added those also to the page like explained and the app now works and renders.
now im getting the error:
TypeError: Cannot read property 'clientHeight' of null
at IonicPullupComponent.push../node_modules/ionic-pullup/fesm5/ionic-pullup.js.IonicPullupComponent.findIonicComponentsInPage (ionic-pullup.js:457)
at ionic-pullup.js:209
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17290)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:498)
at ZoneTask.invoke (zone.js:487)
at timer (zone.js:2281)
but i hope i can also figure that out