CLI to build and develop Next.js apps for Cloudflare Pages
### next-on-pages environment related information build error happens on Cloudflare. However, I'm using Windows locally. System: Platform: win32 Arch: x64 Version: Windows 10 Pro CPU: (4) x64 Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz Memory: 8 GB Package Manager Used: npm (10.9.0) Relevant Packages: @cloudflare/next-on-pages: 1.13.5 vercel: N/A next: 15.0.2 ### Description ``` 13:08:32.476 | ▲ ▲ Next.js 15.0.2 -- | -- 13:08:32.476 | ▲ 13:08:32.533 | ▲ Creating an optimized production build ... 13:08:36.042 | ▲ Failed to compile. 13:08:36.042 | ▲ ./public/logo-small.png 13:08:36.043 | ▲ Error: Could not load the "sharp" module using the linux-x64 runtime 13:08:36.043 | ▲ Possible solutions: 13:08:36.043 | ▲ - Ensure optional dependencies can be installed: 13:08:36.043 | ▲ npm install --include=optional sharp 13:08:36.043 | ▲ - Ensure your package manager supports multi-platform installation: 13:08:36.043 | ▲ See https://sharp.pixelplumbing.com/install#cross-platform 13:08:36.044 | ▲ - Add platform-specific dependencies: 13:08:36.044 | ▲ npm install --os=linux --cpu=x64 sharp 13:08:36.044 | ▲ - Consult the installation documentation: 13:08:36.044 | ▲ See https://sharp.pixelplumbing.com/install 13:08:36.044 | ▲ at Object.<anonymous> (/opt/buildhome/repo/node_modules/sharp/lib/sharp.js:113:9) 13:08:36.044 | ▲ at Module._compile (node:internal/modules/cjs/loader:1376:14) 13:08:36.044 | ▲ at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) 13:08:36.044 | ▲ at Module.load (node:internal/modules/cjs/loader:1207:32) 13:08:36.045 | ▲ at Module._load (node:internal/modules/cjs/loader:1023:12) 13:08:36.045 | ▲ at Module.require (node:internal/modules/cjs/loader:1235:19) 13:08:36.045 | ▲ at mod.require (/opt/buildhome/repo/node_modules/next/dist/server/require-hook.js:65:28) 13:08:36.045 | ▲ at require (node:internal/modules/helpers:176:18) 13:08:36.045 | ▲ at Object.<anonymous> (/opt/buildhome/repo/node_modules/sharp/lib/constructor.js:10:1) 13:08:36.045 | ▲ at Module._compile (node:internal/modules/cjs/loader:1376:14) 13:08:36.045 | ▲ 13:08:36.046 | ▲ Import trace for requested module: 13:08:36.046 | ▲ ./public/logo-small.png 13:08:36.046 | ▲ ./components/Header.tsx 13:08:36.066 | ▲ 13:08:36.067 | ▲ > Build failed because of webpack errors 13:08:36.090 | ▲ Error: Command "npm run build" exited with 1 13:08:36.123 | 13:08:36.124 | ⚡️ The Vercel build (`npx vercel build`) command failed. For more details see the Vercel logs above. 13:08:36.124 | ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories. 13:08:36.124 | 13:08:36.141 | Failed: Error while executing user command. Exited with error code: 1 13:08:36.153 | Failed: build command exited with code: 1 13:08:36.978 | Failed: error occurred while running build command ``` ### Reproduction _No response_ ### Pages Deployment Method Pages CI (GitHub/GitLab integration) ### Pages Deployment ID _No response_ ### Additional Information I'm not using `<Image />` component and I've disable image optimization in Next config with property `images: { unoptimized: true }, } ### Would you like to help? - [X] Would you like to help fixing this bug?
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by wavecatch2020s and has received 1 comments.