Open mikehazell opened 5 years ago
👋 Hi @mikehazell, long time no see.
Can this be resolved in the package?
I'm not sure. I see that we have it in our own config here:
I'm not 100% sure what's causing the issue. Some of the decoders for this library are imported "as is". It's possible we're not trimming some node specific imports from them, Pako, or something in the WebWorker space.
If we can identify the cause, I might be able to prioritize getting a solution in place.
I started having a similar issue after updating to 3.0.0, it's caused by some of the codecs requiring fs: charLS-FixedMemory-browser.js openJPEG-FixedMemory.js
fs may be used by their dependencies, I just noticed that those codecs had a require("fs") in the final bundle.
I was able to fix this by adding node: { fs: 'empty' }
to my webpack config. Thanks for the tip guys.
I was able to fix this by adding
node: { fs: 'empty' }
to my webpack config. Thanks for the tip guys.
+1 this decision helped for me too, thanks
I was able to fix this by adding
node: { fs: 'empty' }
to my webpack config. Thanks for the tip guys.
I did the same, but no luck , I am still getting the error
I am also getting this error.
Didn't work for me. I have node: { fs: 'empty' }
but still get that error.
I had the same issue in my angular project. resolved with "fs": false
in browser entry in package.json
I'm using cornerstone with storybooks. And this is mainly storybooks that's causing problem. Long story short: https://stackoverflow.com/a/64246289/3459479
Hi!
I was getting the same error with 'fs' and 'path'
Module not found: Error: Can't resolve 'fs' in '/Users/.../dev/.../node_modules/cornerstone-wado-image-loader/dist'
...
Module not found: Error: Can't resolve 'path' in '/Users/.../dev/.../node_modules/cornerstone-wado-image-loader/dist'
I was able to fix this error by adding the following code to my webpack.config.js
resolve: {
fallback: { fs: false, path: false },
},
hope this helps!
Getting this error when building my app.
I'm am using
Next.js
which has a default webpack config. Luckily this issue can be resolved on my end by adding to following to the webpack config.Can this be resolved in the package?