-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gatsby-plugin-sass error with postCssAssets #27825
Comments
I've the same error with this config : {
resolve: `gatsby-plugin-sass`,
options: {
postCssPlugins: [require(`tailwindcss`)(tailwindConfig), require(`autoprefixer`), ...(process.env.NODE_ENV === `production` ? [require(`cssnano`)] : [])],
},
}, Console : ERROR #11331 PLUGIN
Invalid plugin options for "gatsby-plugin-sass":
- "postCssPlugins[1]" must be of type object
not finished load plugins - 1.405s
|
Having just investigated a bit further, when I upgraded this module I also upgraded Gatsby. Having downgraded this module, I was still getting the error but downgrading Gatsby to 2.24 works for me even with the new version of the gatsby-plugin-sass, so this is probably an issue with the validation code in Gatsby 2.25 as opposed to the plugin - can you let me know if you want me to edit the issue further? |
Fix incoming! Thanks for the detailed report folks, sorry about the troubles 👍 |
Have another one incoming for ya. Steps to reproduce
Done. What the hell is going on with the gatsby codebase recently? Config:
|
I have the same problem, does someone know a workaround until the MR is fixed and a new version of the plugin is released? |
Yeah! It's not the plugin, it's Gatsby itself, so if you downgrade to Gatsby 2.24 it works again. |
Thanks, but is really 2.4 the last working version 😢 ? I am currently on 2.25.x... |
Sorry! I meant 2.24 |
Thanks it worked for me with these versions:
|
I still have this issue on gatsby 2.26.0 / gatsby-plugin-sass |
this is still an issue 😭 |
Downgrading gatsby-plugin-sass to |
Description
Upgraded from gatsby-plugin-sass ^2.3.22 to ^2.4.1
No indication from the documentation of any breaking change that I can see, but now when I try and run gatsby develop I get the following error message:
My config hasn't changed.
I tried changing both
postcssNormalize
andpostcssPresetEnv
topostcssNormalize()
andpostcssPresetEnv()
but it didn't change anything (and I don't think I should need to do this anyway?)Steps to reproduce
Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue much easier to diagnose (seriously).
How to Make a Minimal Reproduction: https://www.gatsbyjs.org/contributing/how-to-make-a-reproducible-test-case/
Expected result
Project runs
Actual result
Environment
gatsby info --clipboard
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 15.0.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 86.0.4240.111
Edge: 86.0.622.61
Firefox: 82.0.2
Safari: 14.0
npmPackages:
gatsby: ^2.25.1 => 2.25.1
gatsby-cli: ^2.12.115 => 2.12.115
gatsby-plugin-manifest: ^2.5.1 => 2.5.1
gatsby-plugin-offline: ^3.3.1 => 3.3.1
gatsby-plugin-preload-fonts: ^1.2.29 => 1.2.29
gatsby-plugin-react-helmet: ^3.3.14 => 3.3.14
gatsby-plugin-robots-txt: ^1.5.3 => 1.5.3
gatsby-plugin-sass: ^2.4.1 => 2.4.1
gatsby-plugin-sharp: ^2.7.0 => 2.7.0
gatsby-plugin-sitemap: ^2.5.0 => 2.5.0
gatsby-source-filesystem: ^2.4.0 => 2.4.0
gatsby-source-graphql: ^2.7.6 => 2.7.6
gatsby-transformer-sharp: ^2.5.21 => 2.5.21
The text was updated successfully, but these errors were encountered: