-
Notifications
You must be signed in to change notification settings - Fork 362
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
Error module stream in ESM build #539
Comments
Maybe you can set this option in vite? https://vitejs.dev/config/#optimizedeps-exclude Or the rollup options here https://vitejs.dev/config/#build-rollupoptions |
I'm trying with this, but happend the same error
|
Any disclosure for that? I'm facing the same issue. |
Can you reproduce the issue and upload it as a repo for us to look at? |
I found a temporary workaround using umd instead
|
Using a |
The problem happens when packaging the library for frontend since it uses some Node libraries. Like the stream library. In v6 this, will be changed to minimize the node-specific parts and we should reconsider how we expose the different APIs to clearly separate node APIs from standard JS APIs |
works for me |
Another solution could be to import directly the module that you want to use. import parser from 'json2csv/JSON2CSVParser' Closing since a workaround has been given. |
took long enough.... v6, which has moved to a new repo and broken down into smaller packages is in esm. Full docs here: https://juanjodiaz.github.io/json2csv/ |
Still same issue with vite and json2csv@v6 (latest). But the UMD workaround still works. |
Hi!
I'm using this lib in 5.0.6 version with Vite (using the ESM build) and have an error when load the Parser:
I'm not using the Streaming API, only the synchronous so don't know if it's possible to disabled.
Thanks!
The text was updated successfully, but these errors were encountered: