我正在尝试遵循一个基于 Payload CMS 模板构建电子商务项目的教程 我正在基于电子商务项目创建有效负载项目,然后将其克隆到我的 github,然后将其克隆到我的本地计算机,并尝试使用以下命令安装依赖项:
npm install --legacy-peer-deps
PS C:\Users\FPCC\Desktop\WEB DEV\e-commerce-cms> npm install --legacy-peer-deps
npm WARN deprecated [email protected]: this will be v4
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\FPCC\\Desktop\\WEB DEV\\e-commerce-cms\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\FPCC\Desktop\WEB DEV\e-commerce-cms\node_modules\@aws-crypto'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\FPCC\\Desktop\\WEB DEV\\e-commerce-cms\\node_modules\\@aws-crypto'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\FPCC\Desktop\WEB DEV\e-commerce-cms\node_modules\sharp
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-win32-x64.tar.br
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: Request timed out
npm ERR! A complete log of this run can be found in: C:\Users\FPCC\AppData\Local\npm-cache\_logs\2023-12-08T17_17_02_626Z-debug-0.log
npm install --platform=win32 --arch=x64 sharp
我也遇到同样的问题,请问你解决了吗? 我的错误信息是:
PS E:\sites\digitalhippo2> npm install --save --legacy-peer-deps payload
npm ERR! code 1
npm ERR! path E:\sites\digitalhippo2\node_modules\payload\node_modules\sharp
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-win32-x64.tar.br
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: connect ETIMEDOUT 20.205.243.166:443
npm ERR! A complete log of this run can be found in: C:\Users\admin\AppData\Local\npm-cache\_logs\2024-01-25T13_44_16_028Z-debug-0.log