Skip to content

ENOENT: no such file or directory, open '/var/task/../package.json' #343

@vincent-musto

Description

@vincent-musto

Works locally, but get this error when deploying to Lambda with esbuild.

Using 3.1.2, but have tried other 3.x.x releases. Same issue.

Not really sure what to make of this.

{
"errorType": "Error",
"errorMessage": "ENOENT: no such file or directory, open '/var/task/../package.json'",
"code": "ENOENT",
"errno": -2,
"syscall": "open",
"path": "/var/task/../package.json",
"stack": [
"Error: ENOENT: no such file or directory, open '/var/task/../package.json'",
" at Object.readFileSync (node:fs:457:20)",
" at file:///var/task/index.mjs:53:70860",
" at ModuleJob.run (node:internal/modules/esm/module_job:222:25)",
" at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)",
" at async _tryAwaitImport (file:///var/runtime/index.mjs:1008:16)",
" at async _tryRequire (file:///var/runtime/index.mjs:1057:86)",
" at async _loadUserApp (file:///var/runtime/index.mjs:1081:16)",
" at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:21)",
" at async start (file:///var/runtime/index.mjs:1282:23)",
" at async file:///var/runtime/index.mjs:1288:1"
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions