运行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
相关产品推荐
相关产品推荐

