juliomrqz / nuxt-optimized-images

🌅🚀 Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).
https://marquez.co/docs/nuxt-optimized-images/
MIT License
842 stars 30 forks source link

lqip-loader errors #218

Closed schellenbergk closed 4 years ago

schellenbergk commented 4 years ago

Describe the bug After adding lqip-loader getting dependencies not found error when running dev

To Reproduce node -v = 12.7.0

  1. yarn create nuxt-app test-project -> select all defaults
  2. cd test-project
  3. some warnings here
    yarn add --dev @aceforth/nuxt-optimized-images
    yarn add v1.22.4
    [1/4] 🔍  Resolving packages...
    [2/4] 🚚  Fetching packages...
    [3/4] 🔗  Linking dependencies...
    warning "@aceforth/nuxt-optimized-images > img-loader@3.0.1" has incorrect peer dependency "imagemin@^5.0.0 || ^6.0.0".
    warning "@aceforth/nuxt-optimized-images > raw-loader@4.0.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
    warning "@aceforth/nuxt-optimized-images > url-loader@4.1.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
    [4/4] 🔨  Building fresh packages...
    success Saved lockfile.
    success Saved 12 new dependencies.
    ...
  4. yarn dev -> works fine
  5. yarn add --dev lqip-loader
    yarn add v1.22.4
    warning ../../../package.json: No license field
    [1/4] 🔍  Resolving packages...
    warning lqip-loader > lqip > jimp > mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
    warning lqip-loader > lqip > jimp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    [2/4] 🚚  Fetching packages...
    [3/4] 🔗  Linking dependencies...
    warning "@aceforth/nuxt-optimized-images > img-loader@3.0.1" has incorrect peer dependency "imagemin@^5.0.0 || ^6.0.0".
    warning "@aceforth/nuxt-optimized-images > raw-loader@4.0.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
    warning "@aceforth/nuxt-optimized-images > url-loader@4.1.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
    warning " > lqip-loader@2.2.0" has unmet peer dependency "file-loader@*".
    [4/4] 🔨  Building fresh packages...
    success Saved lockfile.
    success Saved 78 new dependencies.
    ...
  6. 
    yarn dev
    ...
    ℹ Preparing project for development                                                               09:33:37
    ℹ Initial build may take a while                                                                  09:33:37
    ✔ Builder initialized                                                                             09:33:37
    ✔ Nuxt files generated                                                                            09:33:37

✖ Client Compiled with some errors in 2.12s

✔ Server Compiled successfully in 1.60s

ERROR Failed to compile with 39 errors friendly-errors 09:33:40

These dependencies were not found: friendly-errors 09:33:40 friendly-errors 09:33:40

welcome[bot] commented 4 years ago

Thanks for opening this issue, a maintainer will get back to you shortly! Be sure to follow the issue template! 🤓

Merott commented 4 years ago

@schellenbergk have you found a workaround for this?

Merott commented 4 years ago

I did more digging, and found this workaround:

// nuxt.config.js

build: {
  babel: {
    presets: [
      [
        '@nuxt/babel-preset-app',
        {
          useBuiltIns: 'usage',
          corejs: 3,
        },
      ],
    ],
  },
},
juliomrqz commented 4 years ago

You can find more info about using core js v3 with Nuxt here https://nuxtjs.org/guide/release-notes#v2.6.0