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

Error 500 on GET /api/trackings and couriers-list.json does not exist #5

Closed
axeleroy opened this issue Dec 15, 2021 · 2 comments
Closed

Comments

@axeleroy
Copy link
Contributor

Hello,

I just deployed courier 0.0.9 and I encounter the following problems/errors:

  • the Select Courier dropdown in the front-end is empty
  • the GET request to /api/trackings returns an HTTP 500 error with {"code":500,"msg":"Internal server error."} as the response
  • I get the following errors in the Docker logs:
[09:03:59] [info] --- STARTING -----------------------------------------------------
[09:03:59] [info] Server started: http://localhost:3000
[09:15:56] [info] Caching response for: /trackings?pageId=1&limit=100
[09:15:56] [error] Internal server error.
[09:15:57] [info] Caching response for: /couriers/list
node:fs:585
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/app/server/cache/couriers-list.json'
    at Object.openSync (node:fs:585:3)
    at Object.writeFileSync (node:fs:2153:35)
    at Object.writeFileSync (/app/node_modules/jsonfile/index.js:78:13)
    at setCache (/app/server/lib/request.js:22:5)
    at /app/server/lib/request.js:55:4
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/app/server/cache/couriers-list.json'
}

Node.js v17.2.0
[09:15:59] [info] --- STARTING -----------------------------------------------------
[09:15:59] [info] Server started: http://localhost:3000
@tborychowski
Copy link
Owner

"cache" folder was missing from the container (silly mistake).
I pushed a fix.
Please try v0.0.10.

@axeleroy
Copy link
Contributor Author

It now works correctly, thanks.

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