#Error: Cannot find module '@tailwindcss/oxide-win32-x64-msvc'
1 messages · Page 1 of 1 (latest)
I can see you're encountering a module not found error related to Tailwind CSS when working with NextJS. This is a common issue, especially on Windows systems.
Based on the knowledge sources, there are several potential solutions you can try:
Solution 1: Rename PostCSS config file
If you're using a PostCSS configuration file, try renaming postcss.config.mjs to postcss.config.cjs and change the export format:
// Change from:
export default config;
// To:
module.exports = config;
This solution has worked for many users experiencing similar issues on Windows, as mentioned in Github Issue #64371.
Solution 2: Clean installation
Try removing your node_modules folder and package-lock.json file, then reinstall:
npm cache clean --force
rm -rf node_modules
rm package-lock.json
npm install
This approach is recommended in the failed-loading-swc documentation for similar module loading issues.
Solution 3: Check Tailwind configuration
Make sure your Tailwind configuration is properly set up according to the NextJS documentation for Tailwind CSS. The issue might be related to how Tailwind is configured in your project.
Solution 4: Environment variable for Windows
For Windows specifically, you might need to run:
$env:PWD = $(Get-Location).Path
This is mentioned in the Tailwind NextJS Starter Blog template as a Windows-specific fix.
If none of these solutions work, you might want to try using an older version of NextJS (like 14.1.0) which some users reported doesn't have this issue, or create a new project without Tailwind CSS initially and then add it manually following the official documentation.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@echo charm Kapa.ai is still learning and improving, please let me know how I did by reacting below.