[Bug?]: `yarn dlx @yarnpkg/doctor` crashes with `plugin-version`
See original GitHub issueSelf-service
- I’d be willing to implement a fix
Describe the bug
@yarnpkg/plugin-version causes yarn dlx @yarnpkg/doctor to crash.
To reproduce
yarn plugin import version
yarn dlx @yarnpkg/doctor
await packageJsonAndInstall({
devDependencies: {
[`typescript`]: `*`
}
});
await yarn(`plugin`, `import`, `https://github.com/yarnpkg/berry/raw/@yarnpkg/cli/3.1.1/packages/plugin-version/bin/%40yarnpkg/plugin-version.js`);
await expect(yarn(`dlx`, `@yarnpkg/doctor`)).rejects.not.toThrow(`Command failed`);
Environment
System:
OS: Linux 5.15 Arch Linux
CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
Binaries:
Node: 17.2.0 - /tmp/xfs-38c6787a/node
Yarn: 3.1.1 - /tmp/xfs-38c6787a/yarn
npm: 8.2.0 - ~/.nvm/versions/node/v17.2.0/bin/npm
npmPackages:
jest: ^27.4.4 => 27.4.4
Additional context
➤ YN0000: ┌ /home/xenfo/Desktop/Projects/utils/package.json
➤ YN0001: │ TypeError: Cannot read properties of undefined (reading 'fetchBase') (when initializing @yarnpkg/plugin-version, defined in /home/xenfo/Desktop/Projects/utils/.yarnrc.yml)
at /home/xenfo/Desktop/Projects/utils/.yarn/plugins/@yarnpkg/plugin-version.cjs:433:6052
at factory (/home/xenfo/Desktop/Projects/utils/.yarn/plugins/@yarnpkg/plugin-version.cjs:446:16014)
at plugin (/tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/core/lib/Configuration.js:793:45)
at Object.prettifyAsyncErrors (/tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/core/lib/miscUtils.js:127:22)
at importPlugin (/tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/core/lib/Configuration.js:792:48)
at Function.find (/tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/core/lib/Configuration.js:817:27)
at async findLockfileWorkspace (/tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/doctor/lib/cli.js:269:35)
at async findWorkspace (/tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/doctor/lib/cli.js:279:39)
at async /tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/doctor/lib/cli.js:301:47
at async StreamReport.startTimerPromise (/tmp/xfs-3b78ecec/dlx-67615/node_modules/@yarnpkg/core/lib/StreamReport.js:220:20)
➤ YN0000: └ Completed
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:9 (1 by maintainers)
Top Results From Across the Web
yarnpkg-doctor | Yarn API
This can cause various weird bugs and crashes. The third party tool should use require.resolve('file-loader') so that Webpack loads the plugin through an ......
Read more >Error Codes - Yarn 2.x 文档
This error is usually caused by a Yarn plugin being missing. YN0011 - FETCHER_NOT_FOUND. A fetcher cannot be found for the given package....
Read more >How to configure VSCode to run Yarn 2 (with PnP) powered ...
VScode -> new window -> open -> open your project folder directly. Then run cmd + shift + p -> Select TypeScript Version...
Read more >Is Yarn 2 ready to use? - Punched Card
I'll go through migration steps to see what happens. 1. Checking for potential errors. Yarn doctor package @yarnpkg/doctor is provided by yarn ......
Read more >CVE - Search Results - MITRE
CVE-2022-28986, LMS Doctor Simple 2 Factor Authentication Plugin For ... (XSS) vulnerability in install/index.php in bugs 1.8 and below version allows ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

any news on that, running into this problem too
I took a look, and it seems that this is caused by the version plugin importing from the Git plugin, which is exhibiting strange behavior as a result. I can also confirm that this is fixed in the latest v4 canary releases.