vite-pwa / astro

Zero-config PWA Integration for Astro
https://vite-pwa-org.netlify.app/frameworks/astro
MIT License
189 stars 6 forks source link

pwa-assets-generator build failed #38

Open abdo-spices opened 6 months ago

abdo-spices commented 6 months ago
Error ```shell npx pwa-assets-generator C:\Users\felfel\Desktop\dev\fruitUI\node_modules.pnpm\sharp@0.33.2\node_modules\sharp\lib\sharp.js:114 throw new Error(help.join('\n')); ^ Error: Could not load the "sharp" module using the win32-x64 runtime ERR_DLOPEN_FAILED: The specified procedure could not be found. \?\C:\Users\felfel\Desktop\dev\fruitUI\node_modules.pnpm@img+sharp-win32-x64@0.33.2\node_modules@img\sharp-win32-x64\lib\sharp-win32-x64.node Possible solutions: Ensure optional dependencies can be installed: npm install --include=optional sharp yarn add sharp --ignore-engines Ensure your package manager supports multi-platform installation: See https://sharp.pixelplumbing.com/install#cross-platform Add platform-specific dependencies: npm install --os=win32 --cpu=x64 sharp Using the canvas package on Windows? See https://sharp.pixelplumbing.com/install#canvas-and-windows Check for outdated versions of sharp in the dependency tree: npm ls sharp Consult the installation documentation: See https://sharp.pixelplumbing.com/install at Object. (C:\Users\felfel\Desktop\dev\fruitUI\node_modules.pnpm\sharp@0.33.2\node_modules\sharp\lib\sharp.js:114:9) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at Object. (C:\Users\felfel\Desktop\dev\fruitUI\node_modules.pnpm\sharp@0.33.2\node_modules\sharp\lib\constnode_modules\sharp\lib\constructor.js:10:1) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) ```

https://vscode.dev/github/spices-solutions/fruitUI/tree/refactor

image

userquin commented 6 months ago

Try adding this entries to your package.json and then run pnpm:

"resolutions": {
  "sharp": "0.32.6",
  "sharp-ico": "0.1.5",
}