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.

incompatibility with async plugins

See original GitHub issue

If you try to use require hook with any async plugin (for example postcss-import) you get error throw new Error('Use process(css).then(cb) to work with async plugins');

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:5
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jedrichardscommented, Mar 2, 2016

I’m using postcss-import to do something like,

@import "../colors.css";

.foo {
  color: var(--my-col);
}

And I get the async plugins error …

Hook setup looks like this,

require('css-modules-require-hook')({
  prepend: [require('postcss-import')(), require('postcss-cssnext')()]
})

The postcss-cssnext portion works fine, but it bombs out because postcss-import is async only.

I’ve opened an issue at postcss-import since it looks like they used to have a sync mode, but removed it 😕

https://github.com/postcss/postcss-import/issues/180

0reactions
sullenorcommented, Mar 2, 2016

@anru nice solution 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatibility Async JS & Elementor Form on mobile devices
Does anybody know if it's a 'plugin thing' or, rather, a plugin's configuration thing? Or how to to solve it so that I...
Read more >
Developers - incompatibility with async plugins - - Bountysource
Coming soon: A brand new website interface for an even better experience!
Read more >
What is your opinion on the API incompabilities ... - Reddit
Now neovim needs to implement a compatibility layer to stay relevant since many vim plugins will start using the async support.
Read more >
Plugin with AMP incompatibility - GeneratePress
After updates received this error in AMP plugin. ... createElement(__DOUBLE_QUOTED_STRING__);\r\nscript.async = true;\r\nscript.type ...
Read more >
Known Beaver Builder incompatibilities
This plugin works with Beaver Builder if both of the following conditions are met: jQuery is excluded; wp-includes/js is added to the Async...
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