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

Caniuse-lite is outdated. Please run: npx update-browserslist-db@latest #82

Open
Pragrammist opened this issue Dec 20, 2024 · 2 comments

Comments

@Pragrammist
Copy link

Pragrammist commented Dec 20, 2024

I ran into an unexpected issue while trying to bundle your project with esbuild.
Here's the error message I got:

Browserslist: caniuse-lite is outdated. Please run:

npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme

Rebuilding...
ReferenceError: plugin is not defined
at C:\Users\f\Documents\gleam_project\me_and_others\front_ui\tailwind.config.js:11:12
at evalModule (C:\snapshot\tailwindcss\node_modules\jiti\dist\jiti.js:1:255614)
at jiti (C:\snapshot\tailwindcss\node_modules\jiti\dist\jiti.js:1:253542)
at C:\snapshot\tailwindcss\lib\lib\load-config.js:48:30
at loadConfig (C:\snapshot\tailwindcss\lib\lib\load-config.js:50:6)
at Object.loadConfig (C:\snapshot\tailwindcss\lib\cli\build\plugin.js:135:49)
at Object.getContext (C:\snapshot\tailwindcss\lib\cli\build\plugin.js:204:27)
at C:\snapshot\tailwindcss\lib\cli\build\plugin.js:254:38
at C:\snapshot\tailwindcss\lib\processTailwindFeatures.js:48:11
at Object.Once (C:\snapshot\tailwindcss\lib\cli\build\plugin.js:262:19).

My tailwind config file

/** @type {import('tailwindcss').Config} */
const plugin = require('tailwindcss/plugin');
const flattenColorPalette = require('tailwindcss/lib/util/flattenColorPalette').default;

module.exports = {
  content: ["./index.html", "./src/**/*.{gleam,mjs}"],
  theme: {
    extend: {
      width: {
        '256': '64rem',
        '158': '39.5rem'
      }
    },
  },
  plugins: [
    plugin(function({ matchUtilities, theme }) {
      matchUtilities(
        {
          'stop-color': (value) => ({
            stopColor: value
          }),
        },
        { values: flattenColorPalette(theme('colors')), type: 'color' }
      )
    })
  ],
};
@Pragrammist
Copy link
Author

I tried npx update-browserslist-db@latest

@Pragrammist
Copy link
Author

Removing of plugin solve the problem, but i need this plugin

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

No branches or pull requests

1 participant