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
c36d3427
Unverified
Commit
c36d3427
authored
Feb 25, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Feb 25, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci] Crash if next-swc could not be loaded when `NEXT_TEST_NATIVE_DIR` is specified (#90387)
parent
08ae81fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
package.json
apps/bundle-analyzer/package.json
+3
-3
index.ts
packages/next/src/build/swc/index.ts
+12
-3
No files found.
apps/bundle-analyzer/package.json
View file @
c36d3427
...
...
@@ -3,10 +3,10 @@
"version"
:
"16.0.2-canary.16"
,
"private"
:
true
,
"scripts"
:
{
"build"
:
"cross-env NEXT_TEST_NATIVE_DIR=no next build --no-mangling"
,
"dev"
:
"cross-env NEXT_TEST_NATIVE_DIR=no next dev"
,
"build"
:
"cross-env NEXT_TEST_NATIVE_
IGNORE_LOCAL_INSTALL=true NEXT_TEST_NATIVE_
DIR=no next build --no-mangling"
,
"dev"
:
"cross-env NEXT_TEST_NATIVE_
IGNORE_LOCAL_INSTALL=true NEXT_TEST_NATIVE_
DIR=no next dev"
,
"lint"
:
"eslint ."
,
"start"
:
"cross-env NEXT_TEST_NATIVE_DIR=no next start"
"start"
:
"cross-env NEXT_TEST_NATIVE_
IGNORE_LOCAL_INSTALL=true NEXT_TEST_NATIVE_
DIR=no next start"
},
"dependencies"
:
{
"@radix-ui/react-dialog"
:
"1.1.4"
,
...
...
packages/next/src/build/swc/index.ts
View file @
c36d3427
...
...
@@ -1463,7 +1463,8 @@ function loadNative(importPath?: string) {
? require(__INTERNAL_CUSTOM_TURBOPACK_BINDINGS)
: null
let bindings: RawBindings = customBindings
let attempts: any[] = []
// callers expect that if loadNative throws, it's an array of strings.
let attempts: string[] = []
const NEXT_TEST_NATIVE_DIR = process.env.NEXT_TEST_NATIVE_DIR
for (const triple of triples) {
...
...
@@ -1477,8 +1478,12 @@ function loadNative(importPath?: string) {
'next-swc build: local built @next/swc from NEXT_TEST_NATIVE_DIR'
)
break
}
catch
(
e
)
{}
}
else
{
}
catch
(
e
:
any
)
{
attempts
.
push
(
`Failed to load triple
${
triple
.
platformArchABI
}
:
${
e
.
message
??
e
}
`
)
}
} else if (process.env.NEXT_TEST_NATIVE_IGNORE_LOCAL_INSTALL !== 'true') {
try {
bindings = require(
`
@
next
/swc/
native
/
next
-
swc
.
$
{
triple
.
platformArchABI
}.
node
`
...
...
@@ -1490,6 +1495,10 @@ function loadNative(importPath?: string) {
}
if (!bindings) {
if (NEXT_TEST_NATIVE_DIR) {
throw attempts
}
for (const triple of triples) {
let pkg = importPath
? path.join(
...
...
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