summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/lazy-tomatoes-call.md5
-rw-r--r--packages/integrations/vercel/src/lib/nft.ts6
2 files changed, 11 insertions, 0 deletions
diff --git a/.changeset/lazy-tomatoes-call.md b/.changeset/lazy-tomatoes-call.md
new file mode 100644
index 000000000..e36f95d01
--- /dev/null
+++ b/.changeset/lazy-tomatoes-call.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/vercel': minor
+---
+
+Ignore warnings when traced file fails to parse
diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts
index 6a9ac116e..46604db90 100644
--- a/packages/integrations/vercel/src/lib/nft.ts
+++ b/packages/integrations/vercel/src/lib/nft.ts
@@ -43,6 +43,12 @@ export async function copyDependenciesToFunction({
`[@astrojs/vercel] The module "${module}" inside the file "${file}" couldn't be resolved. This may not be a problem, but it's worth checking.`
);
}
+ }
+ // parse errors are likely not js and can safely be ignored,
+ // such as this html file in "main" meant for nw instead of node:
+ // https://github.com/vercel/nft/issues/311
+ else if (error.message.startsWith('Failed to parse')) {
+ continue;
} else {
throw error;
}