【发布时间】:2022-10-05 21:58:57
【问题描述】:
我使用npm i react-instagram-embed 安装了它。但是,当我尝试使用以下命令将其导入项目时,它给了我一个错误:
import InstagramEmbed from \'react-instagram-embed.
它返回以下错误
Module not found: Error: Can\'t resolve \'querystring\' in \'/home/marcos/Desktop/REACT/Instagram-clone/instagram/node_modules/react-instagram-embed/es\'
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 }
-
您的导入语句中有一个错字。
-
请再次出现,您介意详细说明吗
-
我让你假设缺少结束语,我在发布问题时错过了它
-
您是否尝试过实际错误消息中提出的各种解决方案?
-
是的,我做到了,我对反应有点陌生,所以我在解决此类错误时遇到了一些问题
标签: reactjs