且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我不明白“找不到模块:错误:无法解析'fs''"

更新时间:2022-06-12 09:32:47

当您的平台不支持文件系统时,您也可能会遇到此问题.因此,请尝试将此行添加到您的 webpack.config.js 中以添加相应的pollyfills:

You could also run into this issue when your platform doesn't support file-system. SO try add this line to your webpack.config.js to add the corresponding pollyfills:

module.exports = {
  //...
  node: {
    fs: 'empty',
  }
};