1、执行 shopify version,以查看 Shopify CLI 的当前版本
wangqiang@DESKTOP-QLPK8QM:~$ shopify version Current Shopify CLI version: 3.49.7 💡 Version 3.52.0 available!
2、执行 shopify upgrade,以将 Shopify CLI 更新至最新版本,报错:Error: EACCES: permission denied, rename ‘/usr/lib/node_modules/@shopify/cli’ -> ‘/usr/lib/node_modules/@shopify/.cli-9RdBklQd’ 。如图1

wangqiang@DESKTOP-QLPK8QM:~$ shopify upgrade
Upgrading CLI from 3.49.7 to 3.52.0...
Attempting to upgrade via npm install -g @shopify/cli@latest @shopify/theme@latest...
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/lib/node_modules/@shopify/cli
npm ERR! dest /usr/lib/node_modules/@shopify/.cli-9RdBklQd
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/lib/node_modules/@shopify/cli' -> '/usr/lib/node_modules/@shopify/.cli-9RdBklQd'
npm ERR! [Error: EACCES: permission denied, rename '/usr/lib/node_modules/@shopify/cli' -> '/usr/lib/node_modules/@shopify/.cli-9RdBklQd'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/lib/node_modules/@shopify/cli',
npm ERR! dest: '/usr/lib/node_modules/@shopify/.cli-9RdBklQd'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/wangqiang/.npm/_logs/2023-12-07T03_09_49_269Z-debug-0.log
Upgrade failed!
── external error ────────────────────────────────────────────────────────────────────────────────────────────────
Error coming from `npm install -g @shopify/cli@latest @shopify/theme@latest`
Command failed with exit code 243: npm install -g @shopify/cli@latest @shopify/theme@latest
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
3、在命令 npm install -g @shopify/cli@latest @shopify/theme@latest 前添加 sudo,以提升权限,不再报错
wangqiang@DESKTOP-QLPK8QM:~$ sudo npm install -g @shopify/cli@latest @shopify/theme@latest changed 1013 packages in 1m 121 packages are looking for funding run `npm fund` for details
4、但是查看版本号,仍然无变化。参考:https://www.shuijingwanwq.com/2023/11/29/8249/ 执行:shopify version 时,提示:Version 3.49.7 available!,但是执行:shopify upgrade 成功后,仍然提示:Version 3.49.7 available!。决定暂缓处理。
wangqiang@DESKTOP-QLPK8QM:~$ shopify version Current Shopify CLI version: 3.49.7 💡 Version 3.52.0 available!
Linux 服务器运维、部署与线上故障排查
如果你的网站或后端服务部署在 Linux 服务器上,遇到访问异常、Nginx 配置问题、MySQL / Redis 异常、Docker 服务不可用、磁盘占满、CPU / 内存过高等问题,可以联系我做一次远程排查。
适合以下场景:
✅ 网站打不开或访问不稳定
✅ Nginx / PHP-FPM 配置异常
✅ MySQL / Redis 性能或连接问题
✅ Docker 服务部署与维护
✅ 服务器迁移与环境配置
✅ CPU / 内存 / 磁盘异常排查
服务内容:
✅ Linux 环境检查
✅ 网站部署与迁移
✅ Nginx / PHP-FPM / MySQL / Redis 排查
✅ Docker 配置与维护
✅ 服务器性能分析
✅ 长期远程运维支持
如需咨询,请联系我,并注明:Linux 运维咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复