You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Next.js本地开发遇TypeError: a.default.detectStore(...)未定义求助

问题描述

刚着手开发一个Next.js应用,通过npm run dev本地启动页面时在Firefox浏览器遇到如下错误,Safari中无此问题。应用基于Next.js+Docker示例创建,已排查过页面标签、搜索过相关社区内容但未找到适配方案。

错误信息:

TypeError: a.default.detectStore(...) is undefined

u                 moz-extension://e51e5a88-36af-4f98-b63a-0d30c0512868/h1-check.js:1
1337              moz-extension://e51e5a88-36af-4f98-b63a-0d30c0512868/h1-check.js:1
n                 moz-extension://e51e5a88-36af-4f98-b63a-0d30c0512868/h1-check.js:1
<anonym>          moz-extension://e51e5a88-36af-4f98-b63a-0d30c0512868/h1-check.js:1
<anonym>          moz-extension://e51e5a88-36af-4f98-b63a-0d30c0512868/h1-check.js:1
inject            resource://gre/modules/ExtensionContent.sys.mjs:585
injectInto        resource://gre/modules/ExtensionContent.sys.mjs:458
AsyncFunctionNext self-hosted:799
解决方案
  • 从错误路径moz-extension://可判断,这是Firefox浏览器扩展引发的问题,和你的Next.js应用本身无关。
  • 先禁用所有Firefox扩展,重启应用后访问页面,确认错误是否消失。
  • 若禁用后恢复正常,逐个重新启用扩展,定位到触发错误的那个扩展,要么更新该扩展至最新版本,要么暂时移除它。
  • 也可使用Firefox隐私浏览模式打开页面,隐私模式默认禁用大部分扩展,能快速验证是否为扩展导致的问题。

内容的提问来源于stack exchange,提问作者code4God

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.21 13:54:52