modesty / pdf2json

converts binary PDF to JSON and text, for server-side PDF processing and command-line use.
https://github.com/modesty/pdf2json
Other
2.02k stars 377 forks source link

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

Closed vincent-musto closed 5 months ago

vincent-musto commented 6 months ago

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" ] }

modesty commented 6 months ago

fix is pushed to feat/eslintNtypescript, will be included in v3.1.3

vincent-musto commented 6 months ago

fix is pushed to feat/eslintNtypescript, will be included in v3.1.3

Awesome. Thank you so much for the quick turnaround!