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 when running ng serve or ng build with papaparse@4.5 or never #26

Closed remeezp closed 5 years ago

remeezp commented 6 years ago

Hi,

I am getting the following error when running the mentioned commands:

ERROR in ./node_modules/papaparse/papaparse.min.js Module not found: Error: Can't resolve 'stream' in 'C:\development\workbench\node_modules\papaparse'

alberthaff commented 6 years ago

Hi. Which version of Angular, ngx-papaparse and ng cli you are using?

DaviR87 commented 6 years ago

Same here

angular: 6.0.3 angular/cli: 6.0.7 ngx-papaparse: 3.0.0-beta.0

alberthaff commented 6 years ago

@DaviR87 Thanks.

It seem to be an issue with the latest papaparse release. Papaparse@latest was 4.4.0 when i uploaded ngx-papaparse@3.0.0-beta.0. Version 4.5 has since been released. It works fine when i install papaparse@4.4.0.

Hotfix: Run npm i papaparse@4.4 in your project. This will force the ngx-papaparse to use papaparse@4.4.0 instead of papaparse@4.5.0.

I'll investigate further, and upload a patch once a permanent fix has been found.

DaviR87 commented 6 years ago

@alberthaff It works now. Thank you for this temp fix!

remeezp commented 6 years ago

@alberthaff, thanks very much it's working.

rickyrojas1 commented 6 years ago

still getting this error with the latest ngx-papaparse....is there any fix?

brannon-darby commented 6 years ago

works for me with the temp fix

https://github.com/alberthaff/ngx-papaparse/issues/26#issuecomment-394872523

rickyrojas1 commented 6 years ago

I was able to get it after restarting vsCode. Thank you!

mgoku commented 6 years ago

It is related to issue #517 in Papaparse itself.

I think, for temporary fix, we can lock version 4.4.0 of Papaparse as dependency for ngx-papaparse.

"dependencies": {
    "papaparse": "4.4.0"
},
alberthaff commented 6 years ago

@mgoku Yes. It does not seem like something that will be fixed in the near future, so I will change the dependency to papaparse@~4.4.0 in the next release.

edit: Please use ngx-papaparse@3.0.0 in order to get around this problem.

alberthaff commented 5 years ago

The problem seems to have been solved as of papaparse@4.6.2.

Can anybody confirm this, by running following in a project where you are using ngx-papaparse?

npm i ngx-papaparse@3.0.1 papaparse@4.6.2
ng serve

If you are not receiving any errors, the problem has been solved.