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

运行shopify app dev时出现Unexpected identifier 'assert'错误求助

本地运行Shopify应用时出现「意外的标识符 'assert'」错误

我通过Homebrew安装了Node.js和Shopify CLI,执行shopify app dev命令后得到本地访问地址http://localhost:56467/,但访问该地址时触发错误:Unexpected identifier 'assert'(中文:意外的标识符 'assert')。

错误栈信息如下:

at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
at callTranslator (node:internal/modules/esm/loader:416:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:422:30

页面提示:点击弹窗外部区域、按下Esc键或修复代码可关闭错误弹窗,也可在vite.config.js中设置server.hmr.overlay = false来禁用该弹窗。

我的环境版本

node version = v22.0.0
npm  version = 10.5.1
Current Shopify CLI version = 3.59.1
ruby version = ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin21]
macOS Monterey version 12.7.4

错误截图

错误截图

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.24 21:46:25