Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 04269d0

Browse files
authoredJan 2, 2025··
feat: enhance module resolution paths for getPackageInfo (#767)
1 parent 2e6b4e4 commit 04269d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎packages/devtools/src/npm/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ export async function checkForUpdateOf(name: string, current?: string, nuxt = us
1414
try {
1515
if (!current) {
1616
const require = createRequire(nuxt.options.rootDir)
17-
const info = await getPackageInfo(name, { paths: require.resolve.paths(name) || undefined })
17+
const modulePaths = [
18+
...nuxt.options.modulesDir,
19+
...require.resolve.paths(name) || [],
20+
]
21+
const info = await getPackageInfo(name, { paths: modulePaths })
1822
if (!info)
1923
return
2024
current = info.packageJson.version

0 commit comments

Comments
 (0)
Please sign in to comment.