estevanmaito / windmill-react-ui

🧩 The component library for fast and accessible development of gorgeous interfaces.
https://windmillui.com/react-ui
MIT License
755 stars 148 forks source link

Trying to setup `windmill` library and got error after start app #77

Open Mnigos opened 2 years ago

Mnigos commented 2 years ago

Relevant code or config:

tailwind.config.js

/* eslint unicorn/prefer-module: off, @typescript-eslint/no-var-requires: off */
const defaultTheme = require('tailwindcss/defaultTheme')
const windmill = require('@windmill/react-ui/config')

/**
 * @type {import('tailwindcss').Config}
 */
module.exports = windmill({
  mode: 'jit',
  content: ['./app/**/*.{js,ts,jsx,tsx,md,mdx}'],
  purge: ['./app/**/*.{js,ts,jsx,tsx,md,mdx}'],
  theme: {
    extend: {
      ...defaultTheme,
    },
  },
  plugins: [
    require('@tailwindcss/line-clamp'),
    require('@tailwindcss/typography'),
  ],
})

root.tsx

import type { LinksFunction, MetaFunction } from '@remix-run/node'
import {
  Links,
  LiveReload,
  Meta,
  Outlet,
  Scripts,
  ScrollRestoration,
} from '@remix-run/react'
import { Windmill } from '@windmill/react-ui'

import globalStyles from './styles/global.css'
import tailwindStyles from './styles/app.css'

export const meta: MetaFunction = () => ({
  // eslint-disable-next-line unicorn/text-encoding-identifier-case
  charset: 'utf-8',
  title: 'New Remix App',
  viewport: 'width=device-width,initial-scale=1',
})

export const links: LinksFunction = () => [
  { rel: 'stylesheet', href: globalStyles },
  { rel: 'stylesheet', href: tailwindStyles },
]

export default function App() {
  return (
    <html lang="en">
      <head>
        <Meta />
        <Links />
      </head>
      <body>
        <Windmill>
          <Outlet />
        </Windmill>
        <ScrollRestoration />
        <Scripts />
        <LiveReload />
      </body>
    </html>
  )
}

What you did:

I configurated library with documentation and got that error

What happened:

warn - The `purge`/`content` options have changed in Tailwind CSS v3.0.
warn - Update your configuration file to eliminate this warning.
warn - https://tailwindcss.com/docs/upgrade-guide#configure-content-sources
/Users/igormakowski/Documents/rigtch-music-www/node_modules/@tailwindcss/forms/src/index.js:34
          'border-color': theme('colors.gray.500', colors.gray[500]),
                                                              ^

TypeError: Cannot read properties of undefined (reading '500')
    at /Users/igormakowski/Documents/rigtch-music-www/node_modules/@tailwindcss/forms/src/index.js:34:63
    at registerPlugins (/Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/lib/lib/setupContextUtils.js:600:61)
    at Object.createContext (/Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/lib/lib/setupContextUtils.js:801:5)
    at createContext (/Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/lib/processTailwindFeatures.js:36:48)
    at /Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/lib/cli.js:487:36
    at /Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/lib/processTailwindFeatures.js:38:11
    at Object.Once (/Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/lib/cli.js:489:23)
    at LazyResult.runOnRoot (/Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/peers/index.js:5131:27)
    at LazyResult.runAsync (/Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/peers/index.js:5173:30)
    at LazyResult.async (/Users/igormakowski/Documents/rigtch-music-www/node_modules/tailwindcss/peers/index.js:5024:34)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Problem description:

Application throws error on start

simbamufasa commented 2 years ago

@Mnigos Hi. Did you ever figure this out? Having the same issue with windmill.

ammark100 commented 1 year ago

@Mnigos @simbamufasa any updates on this? Were you able to resolve the issue?

simbamufasa commented 1 year ago

@ammark100 unfortunately not. I only wanted a few components from windmill and ended up leaving it. I'm still interested in hearing a solution if you found one, though.