Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
f8308c9e
Unverified
Commit
f8308c9e
authored
Oct 04, 2023
by
Yagiz Nizipli
Committed by
GitHub
Oct 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: avoid unnecessary `existSync` call (#56419)
Co-authored-by:
Jiachi Liu
<
inbox@huozhi.im
>
parent
b436589f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
next-server.ts
packages/next/src/server/next-server.ts
+2
-2
No files found.
packages/next/src/server/next-server.ts
View file @
f8308c9e
...
...
@@ -367,8 +367,8 @@ export default class NextNodeServer extends BaseServer {
const
buildIdFile
=
join
(
this
.
distDir
,
BUILD_ID_FILE
)
try
{
return
fs
.
readFileSync
(
buildIdFile
,
'utf8'
).
trim
()
}
catch
(
err
)
{
if
(
!
fs
.
existsSync
(
buildIdFile
)
)
{
}
catch
(
err
:
any
)
{
if
(
err
.
code
===
'ENOENT'
)
{
throw
new
Error
(
`Could not find a production build in the '
${
this
.
distDir
}
' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id`
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment