blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

Tailwindcss is not working in Blitz project #378

Closed JZ-314 closed 2 years ago

JZ-314 commented 2 years ago

What is the problem?

I already installed Tailwindcss but the classes are not reflected on project. And when I reinstall Tailwindcss module, it is error like "Error: Cannot find module 'next/dist/server/lib/logging'".

Paste all your error logs here:

Error: Cannot find module 'next/dist/server/lib/logging

$ blitz install tailwind Error: Cannot find module 'next/dist/server/lib/logging' Require stack:

Paste all relevant code snippets here:

import { AppProps, ErrorBoundary, ErrorComponent, AuthenticationError, AuthorizationError, ErrorFallbackProps, useQueryErrorResetBoundary, Router, } from "blitz"; import "animate.css"; import "tailwindcss/tailwind.css"; import "app/core/styles/global.css"; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; import { ThemeProvider } from "app/core/context/ThemeContext";

export default function App({ Component, pageProps }: AppProps) { const getLayout = Component.getLayout || ((page) => page);

return ( <ErrorBoundary FallbackComponent={RootErrorFallback} onReset={useQueryErrorResetBoundary().reset}

{getLayout()}

); }

What are detailed steps to reproduce this?

  1. npm modules are not installed and not working on blitz project with tailwindcss, ...

Run blitz -v and paste the output here:

Windows 10 | win32-x64 | Node: v14.17.5

blitz: 0.44.0 (global)

Package manager: npm System: OS: Windows 10 10.0.19043 CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz Memory: 5.67 GB / 15.88 GB Binaries: Node: 14.17.5 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found npmPackages: @prisma/client: Not Found blitz: Not Found prisma: Not Found react: Not Found react-dom: Not Found typescript: Not Found

Please include below any other applicable logs and screenshots that show your problem:

2021-12-04 at 15-37-18

beerose commented 2 years ago

Could you try reinstalling Blitz? (or upgrade to the latest version?)

beerose commented 2 years ago

I suppose that this issue is related to: https://github.com/blitz-js/legacy-framework/issues/23. I'm going to close it as a duplicate.