create-react-app CRA - DOM具有不需要的iframe,该iframe阻止从开发者工具中选择元素

sdnqo3pr  于 2022-10-28  发布在  React
关注(0)|答案(2)|浏览(168)

下面的步骤不起作用。dom中仍然有一个iframe。

I recently had this issue aswell.
I did couple of things to make it work. You can try these aswell.

Change the react-script version to 4.0.3 inside package.json.
Add this to package.json below the dependencies
"resolutions": { "react-error-overlay": "6.0.9" },
Install react-error-overlay v6.0.9 inside your devDependencies.
Remove your node_modules and package-lock.json.
Do npm install and check that works.
Note: After doing the above steps i had to run npm install react-error-overlay@6.0.9 again to fix this issue.

Hope this helps!!

gojuced7

gojuced71#

我们也遇到了这种情况。它屏蔽了整个应用程序的内容。这种情况只发生在localhost AFAIK上。Chrome和Firefox浏览器上也出现了这种情况。
请查看下面的屏幕截图以了解更多详细信息:

lnlaulya

lnlaulya2#

我也一样。
我使用此问题#11880解决
在package.json中将react-scripts的版本更改为4.0.3,然后再次运行npm/yarn install

相关问题