Describe the bug
I am trying a migration & tried to run npx @yarnpkg/doctor which triggered an error.
Not sure if npx or yarn is the culprit.
β― npx @yarnpkg/doctor
npx: installed 300 in 39.189s
Internal Error: Cannot find module '@yarnpkg/fslib/sources'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/moox/.npm/_npx/10733/lib/node_modules/@yarnpkg/doctor/node_modules/@yarnpkg/plugin-essentials/lib/commands/node.js:12:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
To Reproduce
I have no idea how to reproduce this since this might be something related to my setup. I can provide you as many things as you ask but I don't what to share in the first place except env info.
Screenshots
-
Environment if relevant (please complete the following information):
Additional context
I am on a react native project, using fnm to handle my various node version. I am just trying to upgrade & see if that's usage because currently with yarn 1 I have issue to download a single package from a specific private repository (as .npmrc can only have a single registry line)
FYI, here is what yarn dlx gave me (errors look very similar)
β― yarn dlx @yarnpkg/doctor .
β€ YN0000: β Resolution step
β€ YN0000: β Completed in 15.71s
β€ YN0000: β Fetch step
β€ YN0013: β tunnel@npm:0.0.6 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β type-fest@npm:0.10.0 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β type-fest@npm:0.11.0 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β typescript@npm:3.8.3 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β typescript@patch:typescript@npm%3A3.8.3#builtin<compat/typescript>::version=3.8.3&hash=270b6c can't be found in the cache and will be fetched fromβ€ YN0013: β wrap-ansi@npm:6.2.0 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β yallist@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β yoga-layout-prebuilt@npm:1.9.5 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β yup@npm:0.27.0 can't be found in the cache and will be fetched from the remote registry
β€ YN0000: β Completed in 1.51m
β€ YN0000: β Link step
β€ YN0000: β Completed in 0.61s
β€ YN0000: Done in 1.78m
Internal Error: Qualified path resolution failed - none of the candidates can be found on the disk.
Source path: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources.js
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources.json
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources.node
Require stack:
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-plugin-essentials-virtual-aad65e3ef5/9/Users/moox/.yarn/berry/cache/@yarnpkg-plugin-essentials-npm-2.0.0-rc.24-cf4099d310-2.zip/node_modules/@yarnpkg/plugin-essentials/lib/commands/node.js
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-plugin-essentials-virtual-aad65e3ef5/9/Users/moox/.yarn/berry/cache/@yarnpkg-plugin-essentials-npm-2.0.0-rc.24-cf4099d310-2.zip/node_modules/@yarnpkg/plugin-essentials/lib/index.js
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-cli-virtual-c044b0b93e/9/Users/moox/.yarn/berry/cache/@yarnpkg-cli-npm-2.0.0-rc.30-fd202c7920-2.zip/node_modules/@yarnpkg/cli/lib/tools/getPluginConfiguration.js
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-cli-virtual-c044b0b93e/9/Users/moox/.yarn/berry/cache/@yarnpkg-cli-npm-2.0.0-rc.30-fd202c7920-2.zip/node_modules/@yarnpkg/cli/lib/index.js
- /Users/moox/.yarn/berry/cache/@yarnpkg-doctor-npm-2.0.0-rc.16-db5c64afa7-2.zip/node_modules/@yarnpkg/doctor/lib/cli.js
Source path: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources.js
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources.json
Rejected candidate: /Users/moox/.yarn/berry/cache/@yarnpkg-fslib-npm-2.0.0-rc.17-dfef6555ed-2.zip/node_modules/@yarnpkg/fslib/sources.node
Require stack:
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-plugin-essentials-virtual-aad65e3ef5/9/Users/moox/.yarn/berry/cache/@yarnpkg-plugin-essentials-npm-2.0.0-rc.24-cf4099d310-2.zip/node_modules/@yarnpkg/plugin-essentials/lib/commands/node.js
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-plugin-essentials-virtual-aad65e3ef5/9/Users/moox/.yarn/berry/cache/@yarnpkg-plugin-essentials-npm-2.0.0-rc.24-cf4099d310-2.zip/node_modules/@yarnpkg/plugin-essentials/lib/index.js
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-cli-virtual-c044b0b93e/9/Users/moox/.yarn/berry/cache/@yarnpkg-cli-npm-2.0.0-rc.30-fd202c7920-2.zip/node_modules/@yarnpkg/cli/lib/tools/getPluginConfiguration.js
- /private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-cli-virtual-c044b0b93e/9/Users/moox/.yarn/berry/cache/@yarnpkg-cli-npm-2.0.0-rc.30-fd202c7920-2.zip/node_modules/@yarnpkg/cli/lib/index.js
- /Users/moox/.yarn/berry/cache/@yarnpkg-doctor-npm-2.0.0-rc.16-db5c64afa7-2.zip/node_modules/@yarnpkg/doctor/lib/cli.js
at Object.makeError (/private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.pnp.js:5625:34)
at resolveUnqualified (/private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.pnp.js:13056:29)
at resolveRequest (/private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.pnp.js:13081:14)
at Object.resolveRequest.maybeLog [as resolveRequest] (/private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.pnp.js:13143:26)
at Function.module_1.Module._resolveFilename (/private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.pnp.js:12338:34)
at Function.module_1.Module._load (/private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.pnp.js:12223:40)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/private/var/folders/x_/wwvkzdz104n7j0m5jj2dq06m0000gn/T/xfs-764504ce/dlx-11297/.yarn/$$virtual/@yarnpkg-plugin-essentials-virtual-aad65e3ef5/9/Users/moox/.yarn/berry/cache/@yarnpkg-plugin-essentials-npm-2.0.0-rc.24-cf4099d310-2.zip/node_modules/@yarnpkg/plugin-essentials/lib/commands/node.js:12:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
I see the issue - a bogus import crept in the source due to an imperfect TS autocompletion. I'll fix it and add some tests on it.
Most helpful comment
I see the issue - a bogus import crept in the source due to an imperfect TS autocompletion. I'll fix it and add some tests on it.