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

How to use with Angular / Webpack #148

Open
jimmykane opened this issue Sep 6, 2020 · 4 comments
Open

How to use with Angular / Webpack #148

jimmykane opened this issue Sep 6, 2020 · 4 comments

Comments

@jimmykane
Copy link

Hi there,

I have installed the module but once I try to import it I get:

ERROR in ./node_modules/zstd-codec/lib/zstd-codec-binding.js
Module not found: Error: Can't resolve 'fs' in '/Users/dimtrioskanellopoulos/Projects/track-tools/node_modules/zstd-codec/lib'

ERROR in ./node_modules/zstd-codec/lib/zstd-codec-binding.js
Module not found: Error: Can't resolve 'path' in '/Users/dimtrioskanellopoulos/Projects/track-tools/node_modules/zstd-codec/lib'

ERROR in ./node_modules/zstd-codec/lib/zstd-codec-binding-wasm.js
Module not found: Error: Can't resolve 'path' in '/Users/dimtrioskanellopoulos/Projects/track-tools/node_modules/zstd-codec/lib'
@szaboge
Copy link

szaboge commented Jan 7, 2021

I have the same problem. @jimmykane Do you have a solution for this?

@jimmykane
Copy link
Author

jimmykane commented Jan 7, 2021 via email

@RouR
Copy link

RouR commented Sep 21, 2021

try to use https://github.com/donmccurdy/zstddec

@rtista
Copy link

rtista commented Feb 9, 2022

I'm having exactly the same problem, I wanted to compress a file before sending it to a backend service so the upload is faster, but I'm having the same errors as @jimmykane :/ I've tried to add the following configuration to WebAssembly, but it's not working:

resolve: {
    fallback: {
          'crypto': require.resolve('crypto-browserify'),
          'path': require.resolve('path-browserify'),
          'stream': require.resolve('stream-browserify'),
          'fs': 'empty'
    }
}

@RouR 's suggestion won't work because I need to compress and not to decompress :/

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

4 participants