-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[V4] Windows + Nuxt + Postcss: Pre-transform error: [postcss] Cannot read properties of undefined (reading 'call') #15156
Comments
Manually installed [9:42:22 pm] ERROR Cannot start nuxt: Cannot find module 'C:\Users\manas\dev\saas\node_modules\.pnpm\node_modules\@tailwindcss\oxide-win32-x64-msvc\tailwindcss-oxide.win32-x64-msvc.node'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:445:19)
at Module._findPath (node:internal/modules/cjs/loader:716:18)
at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
at Function.resolve (node:internal/modules/helpers:190:19)
at jitiResolve (C:\Users\manas\dev\saas\node_modules\.pnpm\j[email protected]\node_modules\jiti\dist\jiti.cjs:1:187103)
at jitiRequire (C:\Users\manas\dev\saas\node_modules\.pnpm\j[email protected]\node_modules\jiti\dist\jiti.cjs:1:189171)
at C:\Users\manas\dev\saas\node_modules\.pnpm\j[email protected]\node_modules\jiti\dist\jiti.cjs:1:199188
at C:/Users/manas/dev/saas/node_modules/.pnpm/@[email protected]/node_modules/@tailwindcss/oxide/index.js:72:29
at eval_evalModule (C:\Users\manas\dev\saas\node_modules\.pnpm\j[email protected]\node_modules\jiti\dist\jiti.cjs:1:196161)
at jitiRequire (C:\Users\manas\dev\saas\node_modules\.pnpm\j[email protected]\node_modules\jiti\dist\jiti.cjs:1:190101) |
Removed the Now getting the following error: ERROR Pre-transform error: [postcss] Cannot read properties of undefined (reading 'call') In the node modules, saw that the |
Instead of adding Tailwind postcss plugin in own Nuxt Module, added this plugin in brand new nuxt app: //nuxt.config.ts
export default defineNuxtConfig({
// modules: [['../src/module', {}]],
devtools: { enabled: true },
compatibilityDate: '2024-11-21',
css: ['~/assets/styles/tw.css'],
postcss: {
plugins: {
'@tailwindcss/postcss': {},
},
},
}) // assets/styles/tw.css
@import "tailwindcss"; Still got the same error: ✔ Vite client built in 375ms 10:12:00 pm
✔ Vite server built in 2214ms 10:12:02 pm
ERROR Pre-transform error: [postcss] Cannot read properties of undefined (reading 'call') 10:12:02 pm
✔ Nuxt Nitro server built in 2970 ms nitro 10:12:05 pm
ℹ Vite client warmed up in 1ms 10:12:05 pm
ERROR (node:136) Warning: Label 'Tailwind CSS' already exists for console.time() 10:12:06 pm
(Use node --trace-warnings ... to show where the warning was created)
ERROR (node:136) Warning: Label 'Resolve project' already exists for console.time() As mentioned above, the issue lies in the |
Hey! Can you please provide a reproduction? An actual public repo we can clone to troubleshoot makes it much faster for us to look into it vs. trying to recreate your setup by hand. |
We can mark this as solved due to similar reasons as in #15157 (comment) |
What version of Tailwind CSS are you using?
v4.0.0-beta.2
What build tool (or framework if it abstracts the build tool) are you using?
What version of Node.js are you using?
20.16.0
What browser are you using?
Edge
What operating system are you using?
Windows 11
Reproduction URL
Describe your issue
Got this error on using the Nuxt Module in any other Nuxt project:
The full error is this:
The text was updated successfully, but these errors were encountered: