qwikifiers / qwik-nx

Nx plugin for Qwik
131 stars 24 forks source link

qwik-nx:setup-tailwind | tailwind.config.js missing require('path') #70

Closed giri-jeedigunta closed 1 year ago

giri-jeedigunta commented 1 year ago

Describe the bug Tried adding tailwind using this nx generate qwik-nx:setup-tailwind but when I ran the app it threw an error:

12:52:18 [vite] Internal server error: [postcss] join is not defined Plugin: vite:css File: /Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/apps/host/src/global.css?inline:undefined:undefined at Object.<anonymous> (/Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/apps/host/tailwind.config.js:3:12) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1067:19) at require (node:internal/modules/cjs/helpers:103:18) at getTailwindConfig (/Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:70:53) at /Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:129:92 at /Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11 at plugins (/Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/tailwindcss/lib/index.js:33:63) at LazyResult.runOnRoot (/Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/vite/node_modules/postcss/lib/lazy-result.js:339:16) at LazyResult.runAsync (/Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/vite/node_modules/postcss/lib/lazy-result.js:393:26) at LazyResult.async (/Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/vite/node_modules/postcss/lib/lazy-result.js:221:30) at LazyResult.then (/Users/venjeedi/Dev-Zone/Git-Repos/qwik-mfe/node_modules/vite/node_modules/postcss/lib/lazy-result.js:206:17)

This line is missing in the generated file tailwind.config.js - const { join } = require('path');

To Reproduce Steps to reproduce the behavior:

npm install -g qwik-nx npx create-nx-workspace my-qwik-app --preset=qwik-nx nx generate qwik-nx:setup-tailwind nx serve app

Expected behavior To show the default qwik page not an error page.

Screenshots

Screenshot 2023-02-08 at 13 04 37 Screenshot 2023-02-08 at 13 04 59

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

giri-jeedigunta commented 1 year ago

it's a small fix raised a PR - https://github.com/qwikifiers/qwik-nx/pull/71

giri-jeedigunta commented 1 year ago

This is resolved.