eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
2 lines • 801 B
JavaScript
function createAuthoredModuleBundleError(e,t){let n=t instanceof Error?t.message:String(t),r=[];return(/\.node(?:\b|["'?])/i.test(n)||/native addon|native module|invalid utf-?8|Could not load .*\.node/i.test(n))&&r.push(`If this comes from a native Node package, keep that package external with agent build.externalDependencies so Vercel/Nitro traces it instead of bundling it.`),/Unexpected character|No loader is configured|Could not load|Unknown file extension/i.test(n)&&r.push(`If this comes from an asset import, eve only supports assets that Rolldown can emit for a Node ESM bundle; otherwise load the file through fs/import.meta.url or externalize the package.`),Error([`Failed to bundle authored module "${e}".`,n,...r.map(e=>`Hint: ${e}`)].join(`
`))}export{createAuthoredModuleBundleError};