我是靠谱客的博主 爱撒娇星月,这篇文章主要介绍ERROR in ./node_modules/express/lib/request.js Module not found: Error: Can't resolve 'fs' in 'xx文件',现在分享给大家,希望可以做个参考。
ERROR in ./node_modules/express/lib/request.js Module not found: Error: Can’t resolve ‘fs’ in ‘xxx文件夹’
1.检查是否有fs,没有的话就进行安装npm install ‘xxx’
错误还存在 ==> 执行步骤2
2.在webpack.config.js下面添加
node: {
fs: ‘empty’
}
错误还存在 ==> 执行步骤3
3.检查一个功能性js文件是否import其他的依赖
例子:我检查图中所示的功能文件

后来把图中导入的express去掉错误就解决了

最后
以上就是爱撒娇星月最近收集整理的关于ERROR in ./node_modules/express/lib/request.js Module not found: Error: Can't resolve 'fs' in 'xx文件'的全部内容,更多相关ERROR内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复