Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't resolve `fs` in cornerstone-wado-image-loader in 3.0.0

See original GitHub issue

Getting this error when building my app.

ERROR in /Users/.../ProjectName/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js
Module not found: Error: Can't resolve 'fs' in '/Users/.../ProjectName/node_modules/cornerstone-wado-image-loader/dist'

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.

// next.config.js
export {
  webpack(config) {
    config.externals = { fs: 'commonjs fs' };
    return config;

Can this be resolved in the package?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

sedenardicommented, Sep 25, 2019

I was able to fix this by adding node: { fs: 'empty' } to my webpack config. Thanks for the tip guys.

Meta-Maximcommented, Sep 10, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cornerstonejs - Bountysource
ProjectName/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js Module not found: Error: Can't resolve 'fs' in '/Users/.
Read more >
Module not found: Error: Can't resolve 'fs' in - Stack Overflow
The error is because of angular-cli does not support modules in node like "fs" and "path". (Issue). Add the following to the root...
Read more >
module not found error can't resolve 'fs' in react js -
From what I understand, the main issue seems to be that you can't call server-side (Node) methods in browser-interpreted client-side (front end) code....
Read more >
Can't resolve fs - Help Requests - The Aurelia Discourse
node_modules/@babel/core/lib/transformation/normalize-file.js Module not found: Error: Can't resolve 'fs'. It all started when I added in lines trying to ...
Read more >
[Gatsby, Storyblok] "Can't resolve 'fs' in x" - DEV Community ‍ ‍
Hi there! I'm Arisa, a freelance Full Stack Developer living in Germany I'm developing Lilac, an... Tagged with gatsby,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found