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: Can't resolve 'papaparse/papaparse.min.js' wiht ngx-papaparse@6 #102

Closed mgoku closed 2 years ago

mgoku commented 2 years ago

Describe the bug

Today I upgraded ngx-papaparse to version 6.0 and then my build failed with error message:

./node_modules/ngx-papaparse/fesm2020/ngx-papaparse.mjs:3:0-50 - Error: Module not found: Error: Can't resolve 'papaparse/papaparse.min.js' in '/path/to/project/node_modules/ngx-papaparse/fesm2020'

Papaparse was not added as dependency in package.json because it was not necessary with ngx-paparse@5.

Is it now necessary to add papaparse as dependency to use ngx-papaparse@6 ?

alberthaff commented 2 years ago

Which version of NPM are you using?

mgoku commented 2 years ago

I'm using yarn

Yarn v1.22.19

The problem is gone if I add papaparse as dependency in package.json

alberthaff commented 2 years ago

Papaparse was made a peer dependency in v6, because newer NPM versions automatically installs peer dependencies - apparently yarn doesn't do this.

I'll consider moving it back into dependencies if more people raise this issue, since there are not any major gains in having it as a peerDependency vs a traditional dependency.

VictorJSV commented 2 years ago

Hi!.. Well I installed with npm and I had the same error I'm using node v14.19.0 and npm v6.14.16

The problem is gone if I add papaparse as dependency in package.json too

gopal-augment commented 2 years ago

I'm facing the same issue. Node: 18.10.0 Angular: 14.2.6 ngx-papaparse: "^6.0.0"

any idea?

gopal-augment commented 2 years ago

Got worked with npm i papaparse as dependecy

alberthaff commented 2 years ago

Should be fixed as of 6.0.1