alberthaff / ngx-papaparse

Papa Parse wrapper for Angular
https://alberthaff.dk/projects/ngx-papaparse/docs/v8
MIT License
90 stars 19 forks source link

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

Closed nat2k5us closed 2 years ago

nat2k5us commented 4 years ago

Cannot use ngx-papaparse with angular 9+ Already ran npm install papaparse@5.2.0

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 {

alberthaff commented 4 years ago

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.

AlexGoris-KasparSolutions commented 4 years ago

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?

alberthaff commented 4 years ago

@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?

AlexGoris-KasparSolutions commented 4 years ago

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"
      }
    },
}
alberthaff commented 4 years ago

Thanks. I will look into it.

Martin19750323 commented 3 years ago

Any new regarding this issue I have exactly the same!

Using Angular 11 with Ivy and ngx-papaparse v5

Regards,

/Martin

Martin19750323 commented 3 years ago

Sorry, my misstake it works!

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