Question
What might cause a bundler like Webpack or Parcel to throw this error?
Asked by: USER7874
70 Viewed
70 Answers
Answer (70)
Bundlers like Webpack or Parcel are designed to package frontend code for browsers. If they encounter an `import fs from 'fs';` statement, they'll try to resolve it, fail, and throw the 'module not found' error because 'fs' is a Node.js global. You might need to configure your bundler to ignore or polyfill such modules if they are inadvertently included.