When using a boilerplate app with styling included I'm getting the following errors:
With Vuetify:
ERROR Failed to compile with 1 errors 1:51:37 AM
error in ./assets/app.styl
Module build failed: ValidationError: PostCSS Loader Invalid Options
options['useConfigFile'] is an invalid additional property
@ ./assets/app.styl 4:14-186 13:3-17:5 14:22-194
@ ./.nuxt/App.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js
With Bulma:
ERROR Failed to compile with 1 errors 1:55:37 AM
error in ./node_modules/bulma/css/bulma.css
Module build failed: ValidationError: PostCSS Loader Invalid Options
options['useConfigFile'] is an invalid additional property
@ ./node_modules/bulma/css/bulma.css 4:14-118 13:3-17:5 14:22-126
@ ./.nuxt/App.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js
I tried both with npm and yarn and without eslint
Commenting out the vuetify section in nuxt.config.js
// if (ctx.isServer) {
// config.externals = [
// nodeExternals({
// whitelist: [/^vuetify/]
// })
// ]
// }
Makes the application work without styling.
I have sample problem too.
I found that postcss-loader just release v2.1.2 8 hours ago
So i try to install previous version
npm install postcss-loader@^2.1.1
It's working now!
hope this can help you to work around this problem.
I found the root cause
in [email protected], option was changed.
You have to change node_modules/postcss-loader/lib/options.json
additionalProperties from false back to true
@saknarak That indeed solved the issue! Thanks!
Maybe it's good to clarify it's the bottom additionalProperties
Thanks @saknarak, I decided to learn vue/nuxt today and things just weren't working until I found this. Guess I chose a rough day to start learning lol
If you use yarn, you can add a resolutions block to package.json and reinstall.
Felt like this was a better solution than the others as I will notice this later and remember to check for an update - vs the other fixes that could get overridden or forgotten.
{
"resolutions": {
"postcss-loader": "=2.1.1"
}
}
https://yarnpkg.com/lang/en/docs/selective-version-resolutions/
@CurtisBelt I tried your technique but when pushing to master, I have a build that is done automatically with Dokku, I feel that it does not take into account the resolutions or the maximum version of postcss-loader that I want.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I found the root cause
in [email protected], option was changed.
You have to change node_modules/postcss-loader/lib/options.json
additionalPropertiesfromfalseback totrue