Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vincent-musto opened this issue May 6, 2024 · 2 comments
Closed

Comments

@vincent-musto
Copy link

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
Copy link
Owner

modesty commented May 7, 2024

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

@vincent-musto
Copy link
Author

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

Awesome. Thank you so much for the quick turnaround!

modesty added a commit that referenced this issue May 24, 2024
…tion handlings (#346)

* feat: add eslint, fix issue #321, add test PDF for #321:image exception will only be warned in log, won't stop the text and form parsing

* fix: issue #318, fixed together with #321

* fix: issue #343, resolve pkInfo at build time

* fix: issue #255 and #277, keep parsing if img data is not resolved

* maint: add ts dependency and config, remove root pdf2json.js, use ./bin/pdf2json.js instead

* maint: replace lib/p2jcom*.js with src/cli/p2jcli*.ts, compied cli is moved to /bin/cli

* maint: add compiled bundle to bin/cli and dist

* maint: remove unnecessary build artifacts

* build: add prepare scripts

* test: add more page content verification in test

* test: add more cli tests after jest

* fix: auto create output dir in CLI to make more tests run without setting up directory structure

* fix: #262: correct the condition check, also add i262_4hXzVq.pdf to test/misc
@modesty modesty closed this as completed May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants