pdf2json
pdf2json copied to clipboard
ENOENT: no such file or directory, open '/var/task/../package.json'
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" ] }