Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile an angular 6 app with csvtojson dependency #258

Closed
RaspFR opened this issue May 15, 2018 · 15 comments
Closed

Can't compile an angular 6 app with csvtojson dependency #258

RaspFR opened this issue May 15, 2018 · 15 comments

Comments

@RaspFR
Copy link

RaspFR commented May 15, 2018

If I try to perform an "ng serve" locally I get the following errors since I've updated my app from angular 5 to angular 6, any clue ? :

ERROR in ./node_modules/csvtojson/libs/interfaces/web/webServer.js
Module not found: Error: Can't resolve 'http' in 'D:\dev\repo\RuneManager\node_modules\csvtojson\libs\interfaces\web'
ERROR in ./node_modules/csvtojson/libs/core/Converter.js
Module not found: Error: Can't resolve 'os' in 'D:\dev\repo\RuneManager\node_modules\csvtojson\libs\core'
ERROR in ./node_modules/csvtojson/libs/core/getEol.js
Module not found: Error: Can't resolve 'os' in 'D:\dev\repo\RuneManager\node_modules\csvtojson\libs\core'
ERROR in ./node_modules/csvtojson/libs/core/Converter.js
Module not found: Error: Can't resolve 'stream' in 'D:\dev\repo\RuneManager\node_modules\csvtojson\libs\core'

@geetee24
Copy link

I get same issue with another OS library :(

I suspect that therefore our mutual issue has nothing to do with the lib's source code but with some issue core to ng6 and/or how libs like these - are not built right?

Do you have any ideas?

@nclarx
Copy link

nclarx commented May 26, 2018

I'm having the same issue with Angular 6, see: angular/angular-cli#10681 and angular/angular-cli#4227 (comment) for some potential fixes.

I'm still seeing if I can find a solution.

@Keyang
Copy link
Owner

Keyang commented Jul 12, 2018

Are you still facing the issue with latest csvtojson library?

@jonofcho
Copy link

upgraded to 2.0.6 , issue still stands

@Keyang
Copy link
Owner

Keyang commented Jul 13, 2018

@jonofcho Could you paste what error you are getting?

@jonofcho
Copy link

jonofcho commented Jul 13, 2018

@Keyang
Sure!
When trying to compile,
ERROR in ./node_modules/csvtojson/v2/Converter.js
Module not found: Error: Can't resolve 'stream' in '---------App\node_modules\csvtojson\v2'

@ccocker
Copy link

ccocker commented Jul 21, 2018

I am getting same issue:

"@angular/compiler-cli": "6.0.7","csvtojson": "^2.0.6",

ERROR in ./node_modules/csvtojson/v2/Converter.js
Module not found: Error: Can't resolve 'stream'

@clayh95
Copy link

clayh95 commented Jul 23, 2018

I'm seeing this as well in angular 6

ERROR in ./node_modules/csvtojson/v2/Converter.js
Module not found: Error: Can't resolve 'stream' in '------------------------\node_modules\csvtojson\v2'

@Keyang
Copy link
Owner

Keyang commented Jul 24, 2018

Hi,
I have changed the stream dependency to readable-stream package in 2.0.7
would you give a try?

~Keyang

@shanti-unique
Copy link

shanti-unique commented Jul 28, 2018

I am using csvtojson v2.0.7 in my Angular 6 application. But I am getting this error at runtime:

Uncaught ReferenceError: Buffer is not defined
at Object../node_modules/core-util-is/lib/util.js (util.js:103)
at webpack_require (bootstrap:76)
at Object../node_modules/csvtojson/node_modules/readable-stream/lib/_stream_readable.js (_stream_readable.js:67)
at webpack_require (bootstrap:76)
at Object../node_modules/csvtojson/node_modules/readable-stream/readable-browser.js (readable-browser.js:1)
at webpack_require (bootstrap:76)
at Object../node_modules/csvtojson/v2/Converter.js (Converter.js:16)
at webpack_require (bootstrap:76)
at Object../node_modules/csvtojson/v2/index.js (index.js:2)
at webpack_require (bootstrap:76)

@cyphercodes96
Copy link

#270 check that aswell

@Keyang
Copy link
Owner

Keyang commented Aug 3, 2018

Hi,
Would you test it with v2.0.8?

Regards,
Keyang

@coderbag
Copy link

coderbag commented Aug 8, 2018

@Keyang Yes it doesn't work with v2.0.8

@Keyang
Copy link
Owner

Keyang commented Aug 8, 2018 via email

@Keyang
Copy link
Owner

Keyang commented Aug 27, 2018

Close due to no activity.

@Keyang Keyang closed this as completed Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants