diff --git a/.changeset/lazy-tomatoes-call.md b/.changeset/lazy-tomatoes-call.md new file mode 100644 index 0000000000..e36f95d01d --- /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 6a9ac116ee..46604db902 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; }