The error:
C:\Users\<user>\Desktop\code\texturepacksmc\payload\node_modules\payload-webp\node_modules\sharp\lib\sharp.js:37
throw new Error(help.join('\n'));
^
Error:
Something went wrong installing the "sharp" module
The specified procedure could not be found.
\\?\C:\Users\<user>\Desktop\code\texturepacksmc\payload\node_modules\payload-webp\node_modules\sharp\build\Release\sharp-win32-x64.node
Is fine if I run it on WSL but, node is slow on WSL. Any fix for this? I use cmd primarily
@zochh Sharp has caused a few issues for folks in the past
What operating system are you installing Payload on?
Looks like Windows
Windows 11; it just started doing that
Did you update node or changed versions?
Nope, updated node to v20 from v19 (cant remember subversions) last week, and it worked last week after updating too
So sharp is a module that generally compiles via node-gyp on installation. This issue, among others, is typically because of a change in node.js versions and the version support with Sharp
You can try to clear your npm cache and rebuild your repository node modules
I think it's
npm cache clear
npm rebuild --verbose sharp
If that doesn't work, I have some other ideas
same for yarn?
I use yarn instead of npm
Yeah I would try to clear the yarn cache and then attempt a rebuild, I'm not sure if the syntax is the same
cahce clean worked, rebuild didnt
looking up for the yarn sytanx
hmmm
yarn rebuild sharp
i think should work
Command
rebuild
not found
whoops, having yarn 1.xx
@zochh Maybe a yarn update will resolve the module issue'
yarn upgrade broke the package.json haha. Reverted the changes- going to use npm for the payload bit
Heya, sorry got caught up in work irl
and updated yarn to v2, and try rebuilding
and when running the dev server same error
I've figured the issue out;
Needed to add this to
package.json
"resolutions": {
"sharp": "latest"
}
and needed to remove the webp plugin
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.