Self-service
Describe the bug
I'm importing the node:test module, but doctor gives me an error saying it's an undeclared dependency.
To reproduce
- Create a file with
import "node:test".
- Run
doctor
Environment
System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Max
Binaries:
Node: 21.6.1 - /private/var/folders/fs/c9jy5p9s6cvg_2hv2x2gn5pc0000gn/T/xfs-446a8e07/node
Yarn: 4.2.2 - /private/var/folders/fs/c9jy5p9s6cvg_2hv2x2gn5pc0000gn/T/xfs-446a8e07/yarn
npm: 10.2.4 - ~/.proto/shims/npm
Additional context
It looks like because this module is only importable as node:test and not as just test, this code
|
...(Module.builtinModules || []).map(mod => `node:${mod}`), |
does not cater for it.
node:test also isn't listed in
require("module").builtinModules.
Self-service
Describe the bug
I'm importing the
node:testmodule, but doctor gives me an error saying it's an undeclared dependency.To reproduce
import "node:test".doctorEnvironment
System: OS: macOS 14.5 CPU: (10) arm64 Apple M1 Max Binaries: Node: 21.6.1 - /private/var/folders/fs/c9jy5p9s6cvg_2hv2x2gn5pc0000gn/T/xfs-446a8e07/node Yarn: 4.2.2 - /private/var/folders/fs/c9jy5p9s6cvg_2hv2x2gn5pc0000gn/T/xfs-446a8e07/yarn npm: 10.2.4 - ~/.proto/shims/npmAdditional context
It looks like because this module is only importable as
node:testand not as justtest, this codeberry/packages/yarnpkg-doctor/sources/cli.ts
Line 16 in f1edfae
node:testalso isn't listed inrequire("module").builtinModules.