SyntaxError: 非预期的标识符 – 在 Windows 安装 Shopify Cli 时出错。

huangapple go评论87阅读模式
英文:

SyntaxError: Unexpected identifier - Error installing shopify Cli on windows

问题

I'm tryiong to install shopify Cli in windows with this command following the documentation

npm i -g @shopify/cli@pre @shopify/theme@pre

But when I check the Cli version with

shopify version

I get this error message

C:\Program Files (x86)\Nodist\bin\node_modules@shopify\cli\bin\run.js:5
import runCLI from '../dist/index.js'
^^^^^^

SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:749:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
at Module.load (internal/modules/cjs/loader.js:672:32)
at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
at Function.Module._load (internal.modules/cjs/loader.js:604:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:868:12)
at internal/main/run_main_module.js:21:11

How can I fix this?

英文:

I'm tryiong to install shopify Cli in windows with this command following the documentation

npm i -g @shopify/cli@pre @shopify/theme@pre

But when I check the Cli version with

shopify version

I get this error message

C:\Program Files (x86)\Nodist\bin\node_modules\@shopify\cli\bin\run.js:5
import runCLI from '../dist/index.js'
       ^^^^^^

    SyntaxError: Unexpected identifier
        at Module._compile (internal/modules/cjs/loader.js:749:23)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
        at Module.load (internal/modules/cjs/loader.js:672:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
        at Function.Module._load (internal/modules/cjs/loader.js:604:3)
        at Function.Module.runMain (internal/modules/cjs/loader.js:868:12)
        at internal/main/run_main_module.js:21:11

How can I fix this?

答案1

得分: 1

已更新节点版本,它起作用了!

英文:

Updated node version and it worked!

huangapple
  • 本文由 发表于 2023年5月7日 08:55:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76191812.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定