Skip to content

[Feature]: Support Node.js builds without inspector #5193

@aweebit

Description

@aweebit

What problem does this feature solve?

Currently, Rsbuild cannot be used in environments where Node.js has been built with the --without-inspector flag. Attempts to do so result in errors like this one:

node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available
    at new NodeError (node:internal/errors:371:5)
    at node:inspector:23:9
    at NativeModule.compileForInternalLoader (node:internal/bootstrap/loaders:312:7)
    at NativeModule.compileForPublicLoader (node:internal/bootstrap/loaders:252:10)
    at loadNativeModule (node:internal/modules/cjs/helpers:49:9)
    at ESMLoader.builtinStrategy (node:internal/modules/esm/translators:256:18)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:289:14)
    at async link (node:internal/modules/esm/module_job:70:21) {
  code: 'ERR_INSPECTOR_NOT_AVAILABLE'
}

What does the proposed API look like?

node:inspector should not be required to use Rsbuild.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions