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.

Async exception after adding TailwindCss

See original GitHub issue

I’m trying to add tailwindcss after adding tailwind to the project I have gotten that exception Use process(css).then(cb) to work with async plugins after performing npm run dev the exception belongs to css-modules-require-hook and by googling that exception I found that css-modules-require-hook don’t support async functions. Unfortunately, am not a Webpack expert that’s why am seeking for help and I hope I can find it here. Example of what I have done so far in that repo: https://github.com/hasusuf/react-cool-starter-tailwind

Error stack:

$ better-npm-run dev
running better-npm-run in ~/playground/js/react/react-cool-starter-tailwind
Executing script: dev

to be executed: nodemon ./index.js
[nodemon] 1.18.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: src/server.js src/utils/renderHtml.js
[nodemon] starting `node ./index.js`
~/playground/js/react/react-cool-starter-tailwind/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.js:266
                throw new Error('Use process(css).then(cb) to work with async plugins');
                ^

Error: Use process(css).then(cb) to work with async plugins
    at LazyResult.sync (~/playground/js/react/react-cool-starter-tailwind/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.es6:319:23)
    at LazyResult.warnings (~/playground/js/react/react-cool-starter-tailwind/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.es6:157:21)
    at fetch (~/playground/js/react/react-cool-starter-tailwind/node_modules/css-modules-require-hook/lib/index.js:102:16)
    at hook (~/playground/js/react/react-cool-starter-tailwind/node_modules/css-modules-require-hook/lib/index.js:125:18)
    at Object.cssModulesHook [as .css] (~/playground/js/react/react-cool-starter-tailwind/node_modules/css-modules-require-hook/lib/attachHook.js:16:20)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
[nodemon] app crashed - waiting for file changes before starting...

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hasusufcommented, Aug 12, 2018

That’s why I like this project the most! @wellyshen you rock 👍
Regarding the SSR, I will work on that and I will keep this issue updated.

0reactions
wellyshencommented, Aug 22, 2019

@FarazPatankar It’s the easiest way that I found to integrate with this starter. You don’t need to build it manually. You can integrate it with commands where you need. e.g "dev": yarn tailwind && better-npm-run dev.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does exception still get thrown after catch in async function
In this article, we will try to understand when the exception is caught as well as thrown and later cached in the async...
Read more >
Angular Module build failed when I attempt to run ng s after ...
The issue because ofthe PostCSS 7 compatibility build. As of v2.0, Tailwind CSS depends on PostCSS 8. Because PostCSS 8 is only a...
Read more >
8+ things you need to know when you want to use Spring ...
In this article. I will talk about how to use spring annotation @Async well on asynchronous processing. and you could find some good...
Read more >
Correcting Common Async/Await Mistakes in .NET - YouTube
NET compiler turns our async methods into classes? ... its async code together, showing off performance gains, better exception handling, ...
Read more >
TailwindCSS: Adds complexity, does nothing.
So - with that in mind, with the exception of CSS prioritization, any argument you could make against using inline styles in your...
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