We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Fatal error thrown when importing hubble.gl related to webm-writer running require('fs') in a browser environment.
require('fs')
To Reproduce Steps to reproduce the behavior:
Expected behavior hubble.gl should not throw this error in a browser environment.
Desktop (please complete the following information):
Additional context The issue is coming from hubble's webm-writer dependency and this line of code:
https://github.com/thenickdude/webm-writer-js/blob/ccec843765a4c8fe2e77b0d808730108de0e4353/src/BlobBuffer.js#L222-L226
The text was updated successfully, but these errors were encountered:
This issue is related to thenickdude/webm-writer-js#16 since next.js also uses webpack. The workaround is to modify the webpack config.
Webpack v4 See the quick-start config node.fs: 'empty'
node.fs: 'empty'
hubble.gl/examples/quick-start/webpack.config.js
Lines 27 to 29 in 6c79406
Webpack v5 This config was changed to resolve.fallback.fs: false, see docs.
resolve.fallback.fs: false
next.config.js
module.exports = { ... webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { // Important: return the modified config config.resolve = {...config.resolve, fallback: {fs: false}}; return config }, }
Sorry, something went wrong.
chrisgervang
No branches or pull requests
Describe the bug
Fatal error thrown when importing hubble.gl related to webm-writer running
require('fs')
in a browser environment.To Reproduce
Steps to reproduce the behavior:
Expected behavior
hubble.gl should not throw this error in a browser environment.
Desktop (please complete the following information):
Additional context
The issue is coming from hubble's webm-writer dependency and this line of code:
https://github.com/thenickdude/webm-writer-js/blob/ccec843765a4c8fe2e77b0d808730108de0e4353/src/BlobBuffer.js#L222-L226
The text was updated successfully, but these errors were encountered: