Skip to content

ImportModuleError when bundled as CommonJS (AWS Lambda/esbuild) #765

@leandropls

Description

@leandropls

0.9.2 works on my machine, but not on lambda:

{
    "errorType": "Runtime.ImportModuleError",
    "errorMessage": "Error: Cannot find module '../arktype/index.ts'\nRequire stack:\n- /var/task/index.cjs\n- /var/runtime/index.mjs",
    "stack": [
        "Runtime.ImportModuleError: Error: Cannot find module '../arktype/index.ts'",
        "Require stack:",
        "- /var/task/index.cjs",
        "- /var/runtime/index.mjs",
        "    at _loadUserApp (file:///var/runtime/index.mjs:1192:17)",
        "    at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1235:21)",
        "    at async start (file:///var/runtime/index.mjs:1454:23)",
        "    at async file:///var/runtime/index.mjs:1464:1"
    ]
}

I'll be working on code to reproduce it.

Metadata

Metadata

Assignees

Labels

arkenvChanges to the `arkenv` npm package.bugSomething isn't workingneeds more infoWe need additional details to make this issue actionable

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions