ngx-papaparse icon indicating copy to clipboard operation
ngx-papaparse copied to clipboard

ERROR in node_modules/ngx-papaparse/lib/papa.d.ts:5:22

Open nat2k5us opened this issue 5 years ago • 7 comments
trafficstars

Cannot use ngx-papaparse with angular 9+ Already ran npm install [email protected]

ERROR in node_modules/ngx-papaparse/lib/papa.d.ts:5: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 (ngx-papaparse) which declares Papa 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.

5 export declare class Papa {

nat2k5us avatar Aug 17 '20 05:08 nat2k5us

Hi.

Sorry for the late reply. I have just released a new version (ngx-papaparse@5) which should solve this issue. If not, feel free to reopen this issue.

alberthaff avatar Sep 06 '20 08:09 alberthaff

I'm having this exact problem still today with Angular 10.2.3 and ngx-papaparse@5. Should I open a new issue or can this one be reopened?

@AlexGoris-KasparSolutions No need for a new issue, if it's the same problem. Could you please send me the versions stated in your content package.lock-file? I need the version of ngx-papaparse, papaparse and @angular/core.

Also - do you have ivy enabled?

alberthaff avatar Dec 02 '20 07:12 alberthaff

I have Ivy enabled, yes, I believe it's also the default in angular v10/11

Found this in package-lock.json:

{
    "node_modules/ngx-papaparse": {
      "version": "5.0.0",
      "license": "MIT",
      "dependencies": {
        "papaparse": "^5.3.0",
        "tslib": "^1.10.0"
      }
    },
    "node_modules/ngx-papaparse/node_modules/tslib": {
      "version": "1.14.1",
      "license": "0BSD"
    },
    ...
    "node_modules/papaparse": {
      "version": "5.3.0",
      "license": "MIT"
    },
    ...
    "papaparse": {
      "version": "5.3.0"
    },
    ...
    "node_modules/@angular/core": {
      "version": "10.2.3",
      "license": "MIT",
      "dependencies": {
        "tslib": "^2.0.0"
      },
      "peerDependencies": {
        "rxjs": "^6.5.3",
        "zone.js": "~0.10.3"
      }
    },
}

Thanks. I will look into it.

alberthaff avatar Dec 02 '20 14:12 alberthaff

Any new regarding this issue I have exactly the same!

Using Angular 11 with Ivy and ngx-papaparse v5

Regards,

/Martin

Martin19750323 avatar Jan 02 '21 13:01 Martin19750323

Sorry, my misstake it works!

I just should not declare it in my app.module as import! I'm a beginner!

Martin19750323 avatar Jan 02 '21 13:01 Martin19750323