We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8bc53a commit 4317fefCopy full SHA for 4317fef
1 file changed
src/module-lookup.ts
@@ -271,7 +271,15 @@ function getGlobalNpmPaths(filterPaths = true): string[] {
271
}
272
273
if (process.env.PNPM_HOME) {
274
- paths.push(resolve(process.env.PNPM_HOME, 'global/*/node_modules'));
+ const pnpmHome = process.env.PNPM_HOME;
275
+ paths.push(
276
+ ...globbySync('global/*/node_modules', {
277
+ cwd: pnpmHome,
278
+ onlyDirectories: true,
279
+ suppressErrors: true,
280
+ absolute: true,
281
+ }).map(modulesPath => resolve(modulesPath)),
282
+ );
283
284
285
// Get npm global prefix and infer the module paths from there
0 commit comments