-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: node:test
not recognised as built-in module by @yarnpkg/doctor
#6343
Labels
bug
Something isn't working
Comments
The docs say |
bradleyayers
added a commit
to bradleyayers/berry
that referenced
this issue
Jun 15, 2024
This swaps to use `isBuiltin` from Node rather than constructing a custom set of module names with `node:` prefix. For some modules that didn't have a "bare" module (e.g. `node:test`) this fixes false positive errors. Closes yarnpkg#6343
3 tasks
arcanis
added a commit
that referenced
this issue
Jun 19, 2024
This swaps to use `isBuiltin` from Node rather than constructing a custom set of module names with `node:` prefix. For some modules that didn't have a "bare" module (e.g. `node:test`) this fixes false positive errors. ## What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> Closes #6343 ## How did you fix it? <!-- A detailed description of your implementation. --> ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [ ] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [ ] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [ ] I will check that all automated PR checks pass before the PR gets reviewed. --------- Co-authored-by: Maël Nison <nison.mael@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
import "node:test"
.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 justtest
, this codeberry/packages/yarnpkg-doctor/sources/cli.ts
Line 16 in f1edfae
node:test
also isn't listed inrequire("module").builtinModules
.The text was updated successfully, but these errors were encountered: