shopify安装时遇到的npm install报错处理方案
1、执行命令 npm init @shopify/app@latest 报错:
PS D:\2、Project-my\my-shop> npm init @shopify/app@latest Welcome. Let’s get started by naming your app project. You can change it later. ? Your app project name? √ shulan-test-app ? Which template would you like to use? √ node ── external error ────────────────────────────────────────────────────────────── Error coming from `npm install` Command failed with exit code 1: npm install npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs ...... ...... ...... npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\PC\AppData\Local\npm-cache\_logs\2023-06-14T10_48_09_415Z-debug-0.log
2、分享一下我的解决方法,通过报错初步猜测是npm的问题,解决方法:
- 第一步:管理员权限下清空缓存
npm cache clean --force
- 第二步:更新npm指令
npm install -g npm-check-updates
这里会有人建议再进行一次npm install ,我的会报错,所以省去了;
- 第三步:登录shopify
shopify login
登录成功后会出现:
* Note that CLI 2.x will be sunset on May 31, 2023. √Initiating authentication √Loading available partner organizations Logged into partner organization 名称
- 第四步: 创建一个应用程序
npm init @shopify/app@latest
后续可以参考官方步骤进行开发学习——https://shopify.dev/docs/apps/getting-started/create

浙公网安备 33010602011771号