Skip to content

Commit a270777

Browse files
committedMar 28, 2025··
fix: fast-npm-meta
1 parent 63069f1 commit a270777

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/utils/packument.ts

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ export async function fetchPackage(spec: string, npmConfigs: Record<string, unkn
5151
(_, reject) => setTimeout(() => reject(new Error(`Timeout requesting "${spec}"`)), TIMEOUT),
5252
),
5353
])
54+
55+
if ('error' in data) {
56+
throw new Error(`Failed to fetch package "${spec}": ${data.error}`)
57+
}
58+
5459
return {
5560
tags: data.distTags,
5661
versions: Object.keys(data.versionsMeta),

0 commit comments

Comments
 (0)
Please sign in to comment.