I am having a problem downloading the Sharp dependency for my Next.js project v15.5.6. I've tried reinstalling Node.js, but it still fails.
Below is the failure message after running npm install sharp --verbose
npm info run [email protected] install node_modules/sharp node install/check.js
npm info run [email protected] install { code: 'ERR_INVALID_ARG_TYPE', signal: undefined }
npm verbose stack TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received undefined
npm verbose stack at normalizeSpawnArguments (node:child_process:567:3)
npm verbose stack at spawn (node:child_process:780:13)
I've also downloaded libvips and added the bin to my PATH, however, it still fails to download.
How to I fix this?
Clarifying Notes:
- I am using Node.js 22.21.0
- I am using Windows 11