Next.js Discord

Discord Forum

Build command is broken

Answered
Polar bear posted this in #help-forum
Open in Discord
Polar bearOP
NextJs build command starts the website instead

I tried to build the website but it started the server instead

package.json:
 "scripts": {
    "dev": "next dev ",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },

NextJs version: ^14.0.4
Answered by Giant resin bee
@Polar bear if you delete node_modules and bun upgrade, then retry bun install and this build
View full answer

16 Replies

Polar bearOP
I wonder what bun run build build would do (as my experience with using its clinics it defaults to Dev if no other args)
@Polar bear this is not windows right?
Polar bearOP
It's windows yeah
@Polar bear It's windows yeah
Oh that's the issue, it's kinda buggy
@Polar bear Click to see attachment
Hmmmmm idk then
Giant resin bee
oh no
sad cant reproduce
Giant resin bee
@Polar bear if you delete node_modules and bun upgrade, then retry bun install and this build
Answer
Giant resin bee
does that fix
if so then it is a past issue i fixed but its very not comforting that my mistakes of past are not being cleaned up by newer installs of bun
@Giant resin bee sad cant reproduce
Giant resin bee
i think i had a fix for this, specificlally not passing arguments to scripts
which is what seems to be happening
Giant resin bee
ugh
i wish
it was easier to roll out this change
yeah