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

运行npm run dev遇The requested scope is invalid错误求助

Shopify App开发认证错误:invalid_scope问题

问题现象

已登录Shopify账号,执行npm run dev并按任意键触发授权流程后,终端抛出权限范围无效错误,具体输出如下:

npm run dev

> dev
> shopify app dev



To run this command, log in to Shopify.
👉 Press any key to open the login page on your browser
╭─ error ───────────────────────────────────────────────────────╮
│                                                               │
│  The requested scope is invalid, unknown, or malformed.       │
│                                                               │
╰───────────────────────────────────────────────────────────────╯

浏览器跳转至本地回调页面后,显示:

Something went wrong!
There was an issue while trying to authenticate.
Return to your terminal and try running the previous command again.

排查与解决步骤

  • 检查应用配置文件(如shopify.app.toml)中的scopes字段,确认权限名称拼写正确、无多余标点(如错误的逗号、空格),且均为Shopify官方支持的权限值(例如read_products、write_orders)。
  • 清除本地认证缓存:执行shopify auth logout命令,之后重新运行npm run dev。
  • 升级Shopify CLI至最新版本:执行npm install -g @shopify/cli,确保CLI版本与应用模板兼容。
  • 登录Shopify合作伙伴后台,核对应用的权限设置,保证本地配置的scopes与后台一致。

内容的提问来源于stack exchange,提问作者Jey-Es

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.23 04:16:05