nicolashmln / strapi-plugin-responsive-image

Custom responsive image formats for https://strapi.io
160 stars 29 forks source link

error: Cannot read properties of undefined (reading 'bytesToKbytes') #46

Open hwolf0610 opened 11 months ago

hwolf0610 commented 11 months ago

TypeError: Cannot read properties of undefined (reading 'bytesToKbytes') at Object. (/Volumes/Work/emanuel_git/content-strapi/node_modules/strapi-plugin-responsive-image/server/services/image-manipulation.js:11:11) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/Volumes/Work/emanuel_git/content-strapi/src/extensions/upload/strapi-server.js:1:27) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)

theXLook commented 7 months ago

Hi, I found that with newest version of plugin (1.2.0) and older version of strapi it will not works. (Previously I got 4.5.2) Try to update strapi to newest version (4.21.0 / 1.2.0 works fine) or roll back your plugin to version 1.0.0

@nicolashmln would be nice if You'll place information in readme which plugin version is compatible with a specific version of strapi. The problem is accused with the refactor and changing the way the method 'bytesToKbytes' is exposed in strapi.