在 Windows 10 专业版中安装 Shopify CLI 3.0(基于 Node.js),提前检查相应的要求是否满足
1、参考:https://shopify.dev/themes/tools/cli/install#requirements ,在 Windows 中的要求如下
Node.js 14.17.0 or higher Ruby+Devkit 3.0, installed using RubyInstaller for Windows (select the MSYS2 component and the MSYS2 base installation option) Git Bundler 2.3.8 or higher
2、Node.js 的版本是:v16.13.1,高于 14.17.0。符合要求。
PS E:\wwwroot\laravel-6> node -v v16.13.1
3、参考:https://www.shuijingwanwq.com/2022/05/10/6388/ 。第1、2步骤。Ruby+Devkit 的版本是:3.1.X (x64),高于 Ruby+Devkit 3.0。符合要求。
4、Bundler 的版本是:2.3.24,高于 2.3.8。符合要求。
PS E:\wwwroot\laravel-6> bundle -v Bundler version 2.3.24
5、要为主题安装 Shopify CLI,请使用命令行全局安装 @shopify/cli 和 @shopify/theme Node.js 程序包。如图1
PS E:\wwwroot> npm install -g @shopify/cli @shopify/theme added 824 packages, and audited 825 packages in 2m 93 packages are looking for funding run `npm fund` for details 3 moderate severity vulnerabilities To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. npm notice npm notice New major version of npm available! 8.1.2 -> 9.4.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.4.1 npm notice Run npm install -g npm@9.4.1 to update! npm notice
6、npm 的新主要版本可用! 8.1.2 -> 9.4.1。运行 npm install -g npm@9.4.1 进行更新!
PS E:\wwwroot> npm install -g npm@9.4.1 added 1 package, and audited 27 packages in 9s found 0 vulnerabilities
7、要验证 Shopify CLI 是否已正确安装,运行以下命令。发现版本为 2.x,有待迁移至 3.x。如图2
PS E:\wwwroot> shopify version * A new version of Shopify CLI is available! You have version 2.15.6 and the latest version is 2.34.0. To upgrade, follow the instructions for the package manager you’re using: https://shopify.dev/tools/cli/troubleshooting#upgrade-shopify-cli 2.15.6
1 条回复
[…] […]