Skip to content

/lib/util/flattenColorPalette.js is not defined by "exports" #16401

@dany68

Description

@dany68

What version of Tailwind CSS are you using?

Tailwind v4.0.5

What build tool (or framework if it abstracts the build tool) are you using?

Vite, nuxtjs app, @tailwindcss/vite@4.0.5

What version of Node.js are you using?

Node v22.12.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Describe your issue

Hi after upgrading to v4.0.5 from v4.0.3 i get the following error during npm run dev and build:

Pre-transform error: Package subpath './lib/util/flattenColorPalette.js' is not defined by "exports" in /Users/daniel/Documents/Perso/site-nuxt/node_modules/tailwindcss/package.json
  Plugin: @tailwindcss/vite:generate:serve
  File: /Users/daniel/Documents/Perso/site-nuxt/assets/css/main.css

When i try to downgrade back to 4.0.3 i get the same error, so maybe it is related to tailwindcss/vite.

Here is my nuxt config related to tailwind:

css: [
    '~/assets/css/main.css'
],

vite: {
    build: {
        cssMinify: 'lightningcss'
    },
    plugins: [
        tailwindcss(),
    ],
},
Image

Everything was working fine before the upgrade.
Thanks for your help,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions