Intenté usar esto en mi proyecto Nuxt, pero falló al compilar
en mi complemento/sharp.js
import vue from "vue" import sharp from "sharp" vue.use(sharp)y yo mi nuxt.config.js
plugins: [ '~plugins/sharp.js', ],Recibo error en mi terminal al compilar
Failed to compile with 4 errors friendly-errors 01:16:19 These dependencies were not found: friendly-errors 01:16:19 friendly-errors 01:16:19 * child_process in ./node_modules/detect-libc/lib/detect-libc.js, ./node_modules/sharp/lib/libvips.js friendly-errors 01:16:19 * fs in ./node_modules/detect-libc/lib/detect-libc.js, ./node_modules/sharp/lib/libvips.js friendly-errors 01:16:19 friendly-errors 01:16:19 To install them, you can run: npm install --save child_process fsTuve el mismo problema con reaccionar. Uso la biblioteca npm react-sharp. Creo que paket npm vue-sharp hace lo mismo.