Skip to content
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

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

Open
Mnigos opened this issue Apr 16, 2022 · 3 comments · May be fixed by #99
Open

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

Mnigos opened this issue Apr 16, 2022 · 3 comments · May be fixed by #99

Comments

@Mnigos
Copy link

Mnigos commented Apr 16, 2022

  • windmill-react-ui version: 0.6.0
  • tailwindcss version: 3.0.24
  • remix version: 1.4.0

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
Copy link

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

@ammark100
Copy link

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

@simbamufasa
Copy link

@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.

iamshouvikmitra added a commit to iamshouvikmitra/windmill-react-ui that referenced this issue Jan 3, 2024
@iamshouvikmitra iamshouvikmitra linked a pull request Jan 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants