PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

[Angular] Cannot compile - DropDownModuleImport #251

Closed etiennepericat closed 4 years ago

etiennepericat commented 4 years ago

Hey guys, i'm facing an issue with the DropDown usage...

I can't have it working. This is the error message :

ERROR in node_modules/nativescript-drop-down/angular/index.d.ts:17:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

This likely means that the library (nativescript-drop-down/angular) which declares DropDownModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

17 export declare class DropDownModule {
                        ~~~~~~~~~~~~~~

Here is the content of my app.module.ts :

@NgModule({
    bootstrap: [
        AppComponent
    ],
    imports: [
        NativeScriptModule,
        AppRoutingModule,
        ReactiveFormsModule,
        NativeScriptFormsModule,
        DropDownModule
    ],
    declarations: [
        AppComponent,
        PokemonsComponent,
        PokemonItemComponent
    ],
    providers: [],
    schemas: [
        NO_ERRORS_SCHEMA
    ]
})
export class AppModule { }

Here my dependencies and versions :

"dependencies": {
    "@angular/animations": "~10.0.0",
    "@angular/common": "~10.0.0",
    "@angular/compiler": "~10.0.0",
    "@angular/core": "~10.0.0",
    "@angular/forms": "~10.0.0",
    "@angular/platform-browser": "~10.0.0",
    "@angular/platform-browser-dynamic": "~10.0.0",
    "@angular/router": "~10.0.0",
    "@nativescript/angular": "10.0.0",
    "@nativescript/core": "~7.0.0",
    "@nativescript/theme": "~2.3.0",
    "nativescript-dev-typescript": "^0.10.0",
    "nativescript-drop-down": "^5.0.6",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.6.0",
    "semver": "^7.3.2"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~10.0.0",
    "@nativescript/android": "7.0.0",
    "@nativescript/types": "~7.0.0",
    "@nativescript/webpack": "~3.0.0",
    "@ngtools/webpack": "~10.0.0",
    "typescript": "~3.9.0"
  },

I really need some help here ...

Thanks in advance :+1:

relez commented 4 years ago

Hello @EtiennePer, this I am not sure if the version you are using "nativescript-drop-down": "^5.0.6" is up to date, but this plugin is part of the ProPlugins repository. You can find the latest update here nativescript-drop-down.

Also, keep in mind that the latest version (8.0.0) is not ready for Nativescript 7.0 yet. Please, follow this threat to keep informed when new version is release for NS 7.0 compatibility.

Thanks!

etiennepericat commented 4 years ago

Hello @relez ,

hooo ok I didn't realized that. I will at least try the version you sent me, or try to downgrade to nativescript 6.0.0 then.

Thanks for your quick answer