打破变化:WebPack< 5用于包括node.js核心模块的polyfills,默认情况下... polyfill
因此,我正在使用React.js和Firebase创建一个Instagram克隆,并在处理应用程序的文件上传部分时遇到了问题。错误读取:
“打破变化:webpack< 5用于默认情况下包括node.js核心模块的polyfills。 情况不再如此。验证是否需要此模块并为其配置多填充。
如果要包含一个polyfill,则需要:
- 添加后备'resolve.fallback:{“ querystring”:require.resolve(“ queryString-es3”)}'
- stlins nastion queryString-es3' 如果您不想包含polyfill,则可以使用这样的空模块: resolve.fallback:{“ querystring”:false}“
我对如何前进感到困惑...
So I am creating an Instagram clone using React.js and Firebase, and ran into an issue while working on the file upload portion of the app. The error read:
"BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "querystring": require.resolve("querystring-es3") }'
- install 'querystring-es3'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "querystring": false }"
I am beyond confused on how to move forward...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来“ querystring”已经被描述了,我的
npm run build
命令在某个地方使用了这一行,我对此进行了评论:并使用:
查看上述错误,我尝试安装了我尝试安装的错误
npm i querystring-es3
最终,我不需要它,并卸载了同样的内容。
Looks like 'querystring' was depricated and my
npm run build
command is freaking out as this line was used somewhere, which I commented out:And use this instead:
Looking at the above mentioned error I tried installing
npm i querystring-es3
Eventually I didn't need that and uninstalled the same.