Could not load the configuration file: v is not a function #15781
-
I've followed the steps for using the pnpx @tailwindcss/upgrade@next command and it keeps coming back to the same ambiguous error
here are my recent bash logs dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025/apps/chess-v2$ nvm use 20.18.0
Now using node v20.18.0 (npm v10.9.0)
dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025/apps/chess-v2$ pnpx @tailwindcss/upgrade@next --force
≈ tailwindcss v4.0.0
│ Searching for CSS files in the current directory and its subdirectories…
│ ↳ Linked `./tailwind.config.ts` to `./src/app/globals.css`
│ Migrating JavaScript configuration files…
│ ↳ Could not load the configuration file: v is not a function
dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025/apps/chess-v2$ pnpx @tailwindcss/upgrade@next --force
≈ tailwindcss v4.0.0
│ Searching for CSS files in the current directory and its subdirectories…
│ ↳ Linked `./tailwind.config.ts` to `./src/app/globals.css`
│ Migrating JavaScript configuration files…
│ ↳ Could not load the configuration file: v is not a function
dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025/apps/chess-v2$ nvm use --lts
Now using node v22.13.1 (npm v11.0.0)
dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025/apps/chess-v2$ cd ../..
dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025$ pnpx @tailwindcss/upgrade@next --config apps/chess-v2/tailwind.config.ts --force
≈ tailwindcss v4.0.0
│ Searching for CSS files in the current directory and its subdirectories…
│ ↳ Could not determine configuration file for: `./apps/chess/src/app/globals.css`
│ Update your stylesheet to use `@config` to specify the correct configuration file explicitly and then run the upgrade tool again.
│ ↳ Could not determine configuration file for: `./apps/chess-v2/src/app/globals.css`
│ Update your stylesheet to use `@config` to specify the correct configuration file explicitly and then run the upgrade tool again.
│ ↳ Could not determine configuration file for: `./apps/web/src/app/global.css`
│ Update your stylesheet to use `@config` to specify the correct configuration file explicitly and then run the upgrade tool again. so at this point I followed the instructions to update my @config "../../tailwind.config.ts";
@tailwind base;
@tailwind components;
@tailwind utilities; after making these updates, I tried again dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025$ pnpx @tailwindcss/upgrade@next --force
≈ tailwindcss v4.0.0
│ Searching for CSS files in the current directory and its subdirectories…
│ Migrating JavaScript configuration files…
│ ↳ Could not load the configuration file: v is not a function
dopaminedriven@LAPTOP-2IH011V4:~/personal/portfolio-2025$ pnpx @tailwindcss/upgrade@next --config apps/chess-v2/tailwind.config.ts --force
≈ tailwindcss v4.0.0
│ Searching for CSS files in the current directory and its subdirectories…
│ Migrating JavaScript configuration files…
│ ↳ Could not load the configuration file: v is not a function I decided to look into the source code (specifically the bin file) in the @tailwindcss/upgrade package ( however the only configured cli flag options I could find in the file are the following const options = {
'--config': { type: 'string', description: 'Path to the configuration file', alias: '-c' },
'--help': { type: 'boolean', description: 'Display usage information', alias: '-h' },
'--force': { type: 'boolean', description: 'Force the migration', alias: '-f' },
'--version': { type: 'boolean', description: 'Display the version number', alias: '-v' },
} satisfies Arg Any tips on what I could be doing wrong (or not doing right) for these errors to keep occurring? note: I am using shiki v2+ in the apps/web repo as it handles mdx, syntax highlighting etc I got the following warning from pnpm when trying to install the WARN Issues with peer dependencies found
.
└─┬ @tailwindcss/upgrade 4.0.0
└─┬ tree-sitter-typescript 0.23.2
├── ✕ unmet peer tree-sitter@^0.21.0: found 0.22.4
└─┬ tree-sitter-javascript 0.23.1
└── ✕ unmet peer tree-sitter@^0.21.1: found 0.22.4 so I'm a bit lost as to how to proceed specs using node tried using repo is public facing -- find it here feedback/advice would be greatly appreciated 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 6 replies
-
It would seem like the Tailwind plugins you use, at least |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
same problem, can i help us |
Beta Was this translation helpful? Give feedback.
-
Go to folder where your css is. |
Beta Was this translation helpful? Give feedback.
-
Same. Removing |
Beta Was this translation helpful? Give feedback.
-
It would be nice if instead of throwing these errors if the upgrade tool would recommend removing plugins and adding them back manually (or prompting the user and doing it itself, ya know to handle the upgrade?) |
Beta Was this translation helpful? Give feedback.
It would seem like the Tailwind plugins you use, at least
tailwindcss-animate
ortailwindcss-motion
or both may be causing the error.