Skip to content

Commit 5b50cb9

Browse files
committed
Added error when package export is not found
1 parent a73c773 commit 5b50cb9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/install.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export async function installTemplate(
4949

5050
location = "https://jsr.io/" + slug;
5151
const relativePath = jsr.exports[relativeImport];
52+
if (!relativePath) {
53+
throw new Error(`Module is missing export: ${relativeImport}`);
54+
}
5255
if (relativePath.length > 1) {
5356
location += relativePath.substring(1);
5457
}

0 commit comments

Comments
 (0)