Skip to content

Commit 99bc1d2

Browse files
fix: try fix node.js 16 crash (#10861)
* chore: try fix node.js 16 crash * chore: run all 3 node versions in PR's CI --------- Co-authored-by: pshu <[email protected]>
1 parent 2e1edb9 commit 99bc1d2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/reusable-build-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ jobs:
7171
node: ${{ fromJSON(
7272
inputs.target == 'wasm32-wasip1-threads'
7373
&& '[20]'
74-
|| (contains(inputs.target, 'linux') && github.ref_name == 'main'
75-
&& '[16, 18, 20]'
74+
|| (contains(inputs.target, 'linux') && '[16, 18, 20]'
7675
|| '[18]') )}}
7776
name: Test Node ${{ matrix.node }}
7877
defaults:

packages/rspack/src/trace/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export class JavaScriptTracer {
3535
* @param output tracing output file path
3636
*/
3737
static async initJavaScriptTrace(layer: string, output: string) {
38-
const { Session } = await import("node:inspector");
38+
//FIXME: workaround for Node.js 16 crash bug, remove it when drop support for Node.js 16
39+
const { Session } = require("node:inspector");
3940
this.session = new Session();
4041
this.layer = layer;
4142
this.output = output;

0 commit comments

Comments
 (0)