question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpectedly fails with postcss-loader v4.0.0

See original GitHub issue

Error I’m seeing with postcss-loader v4.0.0:

ERROR in ./assets/scss/style.scss
Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'plugins'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap? }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:36
  • Comments:24

github_iconTop GitHub Comments

75reactions
daniel-cintracommented, Sep 9, 2020

I have the same problem here. Downgraded to postcss-loader v3 to work (not ideal, but does the job for now):

npm uninstall postcss-loader --save-dev
npm install postcss-loader@~3.0.0 --save-dev
63reactions
thegrandpoobahcommented, Sep 30, 2020

I don’t use laravel-mix, but this is one of the few places I saw this error talked about, so adding comments on how I resolved it.

postcss-loader 4 seems to require postcss 8.x, but when I did the upgrade from 3 to 4, postcss was not upgraded automatically. Explicitly upgrading to postcss 8 and making the necessary changes to the postcss.config.js format (specifically plugins: {} to postcssOptions: { plugins: [] }) fixed this problem up for me.

Hope that helps somebody.

Read more comments on GitHub >

github_iconTop Results From Across the Web

postcss-loader - Awesome JS
PostCSS loader for webpack. 62.7M. cloud_download ... unexpected failing on CSS syntax error (#593) (888d72e) ... v4.0.0. local_offer v4.0.0 ...
Read more >
postcss-loader | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Open side panel - You.com
I'm trying to add a custom rule, which should use only style-loader and css-loader . This rule will be activated with .css files...
Read more >
I have a Yarn problem when I try to deploy a Rails 6.x app. I ...
0.0 s => CACHED [node_modules 3/3] RUN yarn install 0.0s => CACHED [stage-4 5/8] COPY --from=node_modules /app/node_modules /app/node_modules ...
Read more >
Error: Loading PostCSS Plugin failed: Invalid or unexpected ...
I got the same error when I tried deploying my Vue app to Digital Ocean droplet. Although my app was building and running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found