Next.js Discord

Discord Forum

Error in new create-next-app

Unanswered
Siamese posted this in #help-forum
Open in Discord
SiameseOP
I just used 'create-next-app' and created a app, ran it using npm and node 23, and got this error

Starting...
 ✓ Ready in 1774ms
 ○ Compiling / ...
 ✓ Compiled / in 3.6s
 ⨯ ./src/app/globals.css
Error evaluating Node.js code
Error: Cannot find module '../lightningcss.win32-x64-msvc.node'
Require stack:
- C:\Users\Pranoy\Code\Personal\acora\node_modules\lightningcss\node\index.js
- C:\Users\Pranoy\Code\Personal\acora\node_modules\@tailwindcss\postcss\dist\index.js
- C:\Users\Pranoy\Code\Personal\acora\.next\build\chunks\[turbopack]_runtime.js
- C:\Users\Pranoy\Code\Personal\acora\.next\transform.js
    [at Function._resolveFilename (node:internal/modules/cjs/loader:1405:15)]
    [at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19)]
    [at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)]
    [at Function._load (node:internal/modules/cjs/loader:1215:37)]
    [at TracingChannel.traceSync (node:diagnostics_channel:322:14)]
    [at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)]
    [at Module.require (node:internal/modules/cjs/loader:1491:12)]
    [at require (node:internal/modules/helpers:135:16)]
    [at Object.<anonymous> (C:\Users\Pranoy\Code\Personal\acora\node_modules\lightningcss\node\index.js:21:22)]
    [at Module._compile (node:internal/modules/cjs/loader:1734:14)]


 ○ Compiling /_error ...
 ✓ Compiled /_error in 1427ms
 GET / 500 in 5644ms

36 Replies

lookin like u installed it wrong or smth
@Kangal Shepherd Dog do u need lightning css?
SiameseOP
i did not done anything i just installed nodejs, used 'npx create-next-app' and ran npm run dev and got this error
Kangal Shepherd Dog
npm remove lightningcss or smth
SiameseOP
npme
nope
@Kangal Shepherd Dog npm remove lightningcss or smth
SiameseOP
any fix? or this is bug ?
Kangal Shepherd Dog
remove lightingcss from package.json
@Kangal Shepherd Dog remove lightingcss from package.json
SiameseOP
i did not installed
Kangal Shepherd Dog
still remove it
@Kangal Shepherd Dog still remove it
SiameseOP
ok
@Kangal Shepherd Dog still remove it
SiameseOP
{
  "name": "acora",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "next": "15.2.0"
  },
  "devDependencies": {
    "typescript": "^5",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "@tailwindcss/postcss": "^4",
    "tailwindcss": "^4",
    "eslint": "^9",
    "eslint-config-next": "15.2.0",
    "@eslint/eslintrc": "^3"
  }
}
there is no lightning css
Kangal Shepherd Dog
bruh
SiameseOP
i also removed the nodejs from my pc and installed clean nodejs using nvm
@Kangal Shepherd Dog bruh
SiameseOP
yes
Kangal Shepherd Dog
i got
no clue why lightningcss is installed
but it is
or smths tryna call it at least
@Kangal Shepherd Dog or smths tryna call it at least
SiameseOP
what?
@Kangal Shepherd Dog look at ur error log
SiameseOP
yes?
Kangal Shepherd Dog
thats ur issue
@Kangal Shepherd Dog thats ur issue
SiameseOP
what?
i did not understood
Kangal Shepherd Dog
uninstall npm and reinstall
or
lookup how to clear packages off npm completely
@Kangal Shepherd Dog uninstall npm and reinstall
SiameseOP
i already did that even i tried on Aws rdp
@Kangal Shepherd Dog lookup how to clear packages off npm completely
SiameseOP
is your nextjs 15.2.0 working fine?
Kangal Shepherd Dog
yes
SiameseOP
hmm maybe its windows problem
Kangal Shepherd Dog
lightningcss isnt a part of nextjs
SiameseOP
i will uninstall windows again and install arch and then i will use
huh f windows