chladog / payload-webp

payloadcms/payload plugin for automatic image conversion to webp format.
https://www.npmjs.com/package/payload-webp
GNU General Public License v3.0
45 stars 5 forks source link

An error when uploading a photo #14

Open mednisrihards opened 1 year ago

mednisrihards commented 1 year ago

Ive set the "sharp": "^0.31.3" in package.json just like sharp listed in payload dependencies and this happens when I'm uploading an image.

Can anybody tell me why this is happening please?

/home/node/app/nodemodules/payload-webp/lib/WebpCollection.js:33 2023-07-13 20:49:39 op = body.call(thisArg, ); 2023-07-13 20:49:39 ^ 2023-07-13 20:49:39 TypeError: Cannot read properties of undefined (reading 'indexOf') 2023-07-13 20:49:39 at /home/node/app/node_modules/payload-webp/lib/WebpCollection.js:106:45 2023-07-13 20:49:39 at step (/home/node/app/node_modules/payload-webp/lib/WebpCollection.js:33:23) 2023-07-13 20:49:39 at Object.next (/home/node/app/node_modules/payload-webp/lib/WebpCollection.js:14:53) 2023-07-13 20:49:39 at /home/node/app/node_modules/payload-webp/lib/WebpCollection.js:8:71 2023-07-13 20:49:39 at new Promise () 2023-07-13 20:49:39 at __awaiter (/home/node/app/node_modules/payload-webp/lib/WebpCollection.js:4:12) 2023-07-13 20:49:39 at convertImages (/home/node/app/node_modules/payload-webp/lib/WebpCollection.js:100:50) 2023-07-13 20:49:39 at /home/node/app/node_modules/payload-webp/lib/WebpCollection.js:138:21 2023-07-13 20:49:39 at step (/home/node/app/node_modules/payload-webp/lib/WebpCollection.js:33:23) 2023-07-13 20:49:39 at Object.next (/home/node/app/node_modules/payload-webp/lib/WebpCollection.js:14:53) 2023-07-13 20:49:39 [nodemon] app crashed - waiting for file changes before starting...