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
Avatar
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

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