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?
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
Is there any way to choose lambda versions with node 16.x.x before deployment?
What could be the reason that it works locally and it doesn't on lambda after (hopefully) also using command next build?
Summary In my Next app I'm using Next.js API decorators library. It works locally in production command
yarn build
and thenyarn start
. I'm working on Node version16.15.1
. After deployment throughtf-next
there is with not finding routes properly. E.g. I have routesGET /health
andGET /health/test
in the same file under pathpages/api/health/[[...params]].ts
. The lambda sees only/health
without/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
next build
?