【发布时间】:2022-06-26 11:46:01
【问题描述】:
我正在开发一个 React 应用程序,我使用了一些 npm 模块,其中一个是我必须自己构建的。 (我的 NPM 包: https://www.npmjs.com/package/modale-react-rm)。
这是一个简单的模式,用useState() 打开和关闭。
导入我的包后,我的控制台出现一个错误,几秒钟后突然出现但没有执行任何操作。
Uncaught (in promise) localhost/:1
>{message: 'A listener indicated an asynchronous response by r…age channel closed before a response was received'}
message: "A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received"
>[[Prototype]]: Object
>constructor: ƒ ()
>[[Prototype]]: Object
/* sometimes there are specific elements in addition but I could not check when they appear and when not */
Promise.then (asynchrone)
(anonyme) @content_script_bundle.js:108
handleNewFeatures @content_script_bundle.js:101
handleUpdatedNodes @content_script_bundle.js:101
(anonyme) @content_script_bundle.js:101
childlist(asynchrone)
0 @purplebox.js:1
(anonyme) @purplebox.js:1
v @purplebox.js:1
它不会阻止我的页面,也不会阻止其功能的正常运行,但这是一个错误,我认为应该修复它,也许可以帮助遇到同样问题的其他人。
我指定我不在此项目中发出任何异步请求。一切都是本地的,我使用的少数数据直接以原始形式导入。 我也不知道 Purplebox.js 是从哪里来的。
【问题讨论】:
标签: javascript reactjs npm