-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Bug] tailwindcss generate failed after 5 seconds, please check your tailwind.css and tailwind.config.js(FIXED) #12563
Comments
Nice @ngechu! I have been struggling with the same issue and thought I could fix it by switching between different branches, but this solution worked and saved me a ton of time. |
Welcome,I also struggled with the same issue and resulted to diving into the node modules when my last working branch stopped working. |
How can I solve this problem. module.exports = {
content: [
'./src/pages/**/*.tsx',
'./src/components/**/*.tsx',
'./src/layouts/**/*.tsx',
'./src/styles/**/*.css',
],
} import { defineConfig } from "@umijs/max";
export default defineConfig({
ssr: {},
npmClient: "pnpm",
tailwindcss: {},
reactQuery: {},
routes: [
{ path: '/', redirect: '/kit/products' },
{ path: "/kit/products", component: "@/pages/kit/products" },
// { path: "/docs", component: "@/pages/docs" },
],
}); max dev
info - [你知道吗?] 如果想点击组件跳转至编辑器源码位置,可尝试新出的 clickToComponent 配置项,详见 https://umijs.org/docs/api/config#clicktocomponent
warn - SSR feature is in beta, may be unstable
Mako https://makojs.dev is a new fast Rust based bundler from us, which is heavily optimized for umi and much faster than webpack. Visit https://makojs.dev/docs/getting-started#bundle-with-umi for more details if you want to give it a try.
info - [plugin: ./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected][email protected]_daoykeix4hyj63bqvg6kbmzzbq/node_modules/@umijs/plugins/dist/react-query] [reactQuery] use local package, version: 4.36.1
info - Umi v4.3.11
info - Preparing...
wait - [SSR] Compiling...
warn - SSR feature is in beta, may be unstable
info - [MFSU][eager] worker init, takes 482ms
fatal - Error: ERROR in ./src/.umi/umi.server.ts 12:0-102
Module not found: Error: Can't resolve '/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/src/.umi/plugin-tailwindcss/tailwind.css' in '/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/src/.umi'
umi compiled with 1 error
at Watching.handler (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/dist/build.js:82:79)
at /home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:93594:9
at Hook.eval [as callAsync] (eval at create (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected]/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:7682), <anonymous>:24:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected]/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:4851)
at Watching._done (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:93590:28)
at onCompiled (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:93470:19)
at /home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:63704:17
at Hook.eval [as callAsync] (eval at create (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected]/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:7682), <anonymous>:15:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected]/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:4851)
at /home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:63700:33
at finalCallback (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:59981:11)
at /home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:60286:11
at Hook.eval [as callAsync] (eval at create (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected]/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:7682), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected]/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:4851)
at /home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@umijs/bundler-webpack/compiled/webpack/index.js:60279:38
at eval (eval at create (/home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.pnpm/@[email protected]/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:7682), <anonymous>:17:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
fatal - A complete log of this run can be found in:
fatal - /home/burak/Desktop/hotwire/rails-7-fullstack/umijs/node_modules/.cache/logger/umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues
|
Hi @burakakca , I think there is a problem with the way you installed tailwind in your project.Use the micro-generator provided by Umi to enable Tailwindcss in your project: Delete all the tailwind files tailwind.css and tailwind.config.js and run |
@burakakca Try to delete the .umi folder and then retry, I think the previous configs have been cached since your error is in the umi folder |
I did those things but still nothing changed :/ my lock file is under package.json, vscode magic. The problem is whenever I enable the ssr |
okay, i have not yet interacted with umi in ssr mode , so I cannot be able to debug it, but I can see a warning that ssr is unstable maybe thats the reason.Try reaching out to the core team. |
@ngechu thanks a lot, I will open a new issue. |
What happens?
Unable to start project yarn start info - [plugin: ./node_modules/@umijs/plugins/dist/tailwindcss] tailwindcss service started Rebuilding... error - [plugin: ./node_modules/@umijs/plugins/dist/tailwindcss] tailwindcss generate failed after 5 seconds, please check your tailwind.css and tailwind.config.js Done in 19.57s.
Mini Showcase Repository(REQUIRED)
How To Reproduce
Under /node_modules/@umijs/plugins/dist/tailwindcss.js you can replicate the error by reducing CHECK_TIMEOUT_UNIT_SECOND value to lets say 1 second
Expected behavior 1. 2.
Should throw an error message on the console log
tailwindcss generate failed after 1 seconds, please check your tailwind.css and tailwind.config.js Done in 19.57s
Context
FIX
I have increased the CHECK_TIMEOUT_UNIT_SECOND value from 5 seconds to 20 second inorder to give some buffer and wait to the generatedPath to be created. I have tested the fix and it is working well.
我已将 CHECK_TIMEOUT_UNIT_SECOND 值从 5 秒增加到 20 秒,以便提供一些缓冲并等待生成的路径创建。我已经测试了修复程序,效果很好。谢谢
Solved
The text was updated successfully, but these errors were encountered: