Next.js Discord

Discord Forum

NextJS 14.1 - [Error: ENOENT: no such file or directory, BUILD_ID

Answered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
Did a fresh installation using npx create-next-app@latest and I get the following when I do npm start:

[Error: ENOENT: no such file or directory, open 'C:\src\ui.next\BUILD_ID'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\src\ui\.next\BUILD_ID'
Answered by Havana
Run npm run build then npm run start
View full answer

14 Replies

Havana
Open a workspace or a directory in VSCode or your IDE
Masai LionOP
what do you mean
Havana
do you have .next folder?
Masai LionOP
This only happens in Next 14.1
was using 14.0 it was fine - just wanted to try out 14.1
@Havana do you have `.next` folder?
Masai LionOP
Do I have to create it ?
Havana
no
Masai LionOP
all I did was npx create-next-app@latest
Havana
Run npm run build then npm run start
Answer
Masai LionOP
Oh wow - thanks
previously npm start would build without needing to run npm build - definitely something changed in 14.1
Thanks @Havana !
Havana
np