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

[BUG] Decorators in API and Runtime Node 16.x.x support #355

Open
MastalerzKamil opened this issue Aug 16, 2022 · 0 comments
Open

[BUG] Decorators in API and Runtime Node 16.x.x support #355

MastalerzKamil opened this issue Aug 16, 2022 · 0 comments

Comments

@MastalerzKamil
Copy link

MastalerzKamil commented Aug 16, 2022

Summary
In my Next app I'm using Next.js API decorators library. It works locally in production command yarn build and then yarn start. I'm working on Node version 16.15.1. After deployment through tf-next there is with not finding routes properly.
E.g. I have routes GET /healthand GET /health/test in the same file under path pages/api/health/[[...params]].ts. The lambda sees only /healthwithout /health/test. I would like to add that locally it works both on development command and production command?

Environment
Node: 16.15.11
TypeScript: 4.7.4
Next: latest

My investigation
I think that the problem could be with experimental decorators or lambda environment. I've tried to change it manually but still problem exists. I thought that the problem could be on library site but somehow if I run it locally with production build, everything works as expected.

Quesstions

  1. Is there any way to choose lambda versions with node 16.x.x before deployment?
  2. What could be the reason that it works locally and it doesn't on lambda after (hopefully) also using command next build?
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

1 participant