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
c482c207
Unverified
Commit
c482c207
authored
Feb 10, 2025
by
Zack Tanner
Committed by
GitHub
Feb 10, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[backport v14] fix: ensure lint worker errors aren't silenced (#75766) (#75779)
Backports: - #75766
parent
5791cb67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
verify-typescript-setup.ts
packages/next/src/lib/verify-typescript-setup.ts
+1
-1
worker.ts
packages/next/src/lib/worker.ts
+3
-2
worker-restart.test.ts
.../production/app-dir/worker-restart/worker-restart.test.ts
+3
-3
No files found.
packages/next/src/lib/verify-typescript-setup.ts
View file @
c482c207
...
...
@@ -164,7 +164,7 @@ export async function verifyTypeScriptSetup({
*/
// we are in a worker, print the error message and exit the process
if
(
process
.
env
.
JEST_WORKER_ID
)
{
if
(
process
.
env
.
IS_NEXT_WORKER
)
{
if
(
err
instanceof
Error
)
{
console
.
error
(
err
.
message
)
}
else
{
...
...
packages/next/src/lib/worker.ts
View file @
c482c207
...
...
@@ -48,6 +48,7 @@ export class Worker {
env
:
{
...((
farmOptions
.
forkOptions
?.
env
||
{})
as
any
),
...
process
.
env
,
IS_NEXT_WORKER
:
'true'
,
}
as
any
,
},
})
as
JestWorker
...
...
@@ -73,7 +74,7 @@ export class Worker {
worker
.
_child
?.
on
(
'exit'
,
(
code
,
signal
)
=>
{
if
((
code
||
(
signal
&&
signal
!==
'SIGINT'
))
&&
this
.
_worker
)
{
logger
.
error
(
`
Static
worker exited with code:
${
code
}
and signal:
${
signal
}
`
`
Next.js build
worker exited with code:
${
code
}
and signal:
${
signal
}
`
)
// We're restarting the worker, so we don't want to exit the parent process
...
...
@@ -96,7 +97,7 @@ export class Worker {
if
(
!
worker
)
return
const
resolve
=
resolveRestartPromise
logger
.
warn
(
`Sending SIGTERM signal to
static
worker due to timeout
${
`Sending SIGTERM signal to
Next.js build
worker due to timeout
${
timeout
?
` of
${
timeout
/
1000
}
seconds`
:
''
}
. Subsequent errors may be a result of the worker exiting.`
)
...
...
test/production/app-dir/worker-restart/worker-restart.test.ts
View file @
c482c207
...
...
@@ -13,10 +13,10 @@ describe('worker-restart', () => {
const
output
=
stdout
+
stderr
expect
(
output
).
toContain
(
'Sending SIGTERM signal to
static
worker due to timeout of 10 seconds. Subsequent errors may be a result of the worker exiting.'
'Sending SIGTERM signal to
Next.js build
worker due to timeout of 10 seconds. Subsequent errors may be a result of the worker exiting.'
)
expect
(
output
).
toContain
(
'
Static
worker exited with code: null and signal: SIGTERM'
'
Next.js build
worker exited with code: null and signal: SIGTERM'
)
expect
(
output
).
toContain
(
'Restarted static page generation for /bad-page because it took more than 10 seconds'
...
...
@@ -41,7 +41,7 @@ describe('worker-restart', () => {
const
output
=
stdout
+
stderr
expect
(
output
).
toContain
(
'
Static
worker exited with code: null and signal: SIGKILL'
'
Next.js build
worker exited with code: null and signal: SIGKILL'
)
})
})
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