vercel / next.js

The React Framework

Home Page:https://nextjs.org

Repository from Github https://github.comvercel/next.jsRepository from Github https://github.comvercel/next.js

Cannot find module 'lightningcss.win32-x64-msvc.node' when installing fresh next js app with tailwindcss v4 and eslint

ehsanrezaeee opened this issue · comments

Link to the code that reproduces this issue

https://github.com/ehsanrezaeee/lightningcss-bug

To Reproduce

1.pnpm install
2.Start the application in next dev (Turbopack or Webpack)
3. error occurs

Current vs. Expected behavior

it wont start and throws an error looking for lightningcss.win32-x64-msvc.node package.
it should start normally and show the main page of create-next-app

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Education
  Available memory (MB): 16089
  Available CPU cores: 12
Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.7.1
Relevant Packages:
  next: 15.3.0-canary.40 // Latest available version is detected (15.3.0-canary.40).
  eslint-config-next: 15.2.4
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Webpack, CSS, Turbopack, Font (next/font), create-next-app

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

Additional context

i tested the app in latest canary version 15.3.0 canray 40 and i used pnpm dlx to install a fresh version of create-next-app. but when i start the development server it wont start and throws an error:

Build Error

Error evaluating Node.js code

./src/app/globals.css

Error evaluating Node.js code
Error: Cannot find module '../lightningcss.win32-x64-msvc.node'

i tried using npm instead of pnpm and it didnt work either. i used webpack as well and though the error was for google font, the stack trace got back to the lighning css module not found

to solve my problem I just installed the latest Microsoft Visual C++ Redistributable runtime.

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.