Search code examples
node.jswebpacksassgatsbypostcss

Css Minimizer Plugin: postcss-svgo: Error: Plugin name should be specified [Gatsby]


Description

I cannot get Webpack, Sass, PostCss whatever it is, to work with me.... Can't find anything in the docs or on google whatsoever. Since migrating to Gatsby v3 I have multiple issues, this is one of them...

Actual result

enter image description here

Environment

I use the default gatsby-plugin-sass, no extra webpack.

Thanks in advance!

  System:
    OS: macOS 11.3.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.14.0 - ~/.nvm/versions/node/v15.14.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.14.0 - ~/.nvm/versions/node/v15.14.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 90.0.4430.212
    Safari: 14.1
  npmPackages:
    gatsby: ^3.5.1 => 3.5.1 
    gatsby-plugin-canonical-urls: ^3.5.0 => 3.5.0 
    gatsby-plugin-catch-links: ^3.5.0 => 3.5.0 
    gatsby-plugin-disqus: ^1.2.2 => 1.2.2 
    gatsby-plugin-eslint: ^3.0.0 => 3.0.0 
    gatsby-plugin-feed: ^3.5.0 => 3.5.0 
    gatsby-plugin-google-tagmanager: ^3.5.0 => 3.5.0 
    gatsby-plugin-image: ^1.5.0 => 1.5.0 
    gatsby-plugin-manifest: ^3.5.0 => 3.5.0 
    gatsby-plugin-netlify: ^3.5.0 => 3.5.0 
    gatsby-plugin-nprogress: ^3.5.0 => 3.5.0 
    gatsby-plugin-offline: ^4.5.1 => 4.5.1 
    gatsby-plugin-react-helmet: ^4.5.0 => 4.5.0 
    gatsby-plugin-robots-txt: ^1.6.2 => 1.6.2 
    gatsby-plugin-sass: ^4.5.0 => 4.5.0 
    gatsby-plugin-sharp: ^3.5.0 => 3.5.0 
    gatsby-plugin-sitemap: ^4.1.0 => 4.1.0 
    gatsby-plugin-smoothscroll: ^1.2.0 => 1.2.0 
    gatsby-remark-images: ^5.2.1 => 5.2.1 
    gatsby-remark-images-contentful: ^4.2.1 => 4.2.1 
    gatsby-remark-relative-images: ^2.0.2 => 2.0.2 
    gatsby-source-contentful: ^5.5.0 => 5.5.0 
    gatsby-source-filesystem: ^3.5.0 => 3.5.0 
    gatsby-transformer-remark: ^4.2.0 => 4.2.0 
    gatsby-transformer-sharp: ^3.5.0 => 3.5.0 
  npmGlobalPackages:
    gatsby-cli: 3.5.0

Solution

  • According to this GitHub thread you can bypass the issue by upgrading Node to v16. Since you are currently in the 15.14 (which is not either an LTS) you should be able to upgrade it without much troubles.

    Remove your package-lock.json (or yarn.lock), your .cache folder, and run a fresh install.

    Alternatively, you can downgrade to the current LTS Node version (14.17.0) which also seems bug-free.

    References:


    Note: this should be a temporary solution while the issue is being fixed.