You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So sorry, I will see if I can write up a simple example to reproduce it when I can but I am seeing a weird problem.
I enabled BFF using the code here: https://modernjs.dev/en/guides/advanced-features/bff/function.html#bff-functions. Basically I added the same hello route:
I ran the new to add the BFF things.
I did also add an
api/app.ts
just to see any access.This all works great running
modern dev
. Can access the API directly in the browser. Can access the pages in the browser.However when I do
modern build
thenmodern serve
which are the production builds mentioned at https://modernjs.dev/en/apis/app/commands.html#modern-build and https://modernjs.dev/en/apis/app/commands.html#modern-serve. However I just get acannot get
error for the hello api route. When typing the wrong route I get a 404 so even though the api returns a 404 in the network tab from a page it seems to be different than a normal 404.I then just tried
modern deploy
and thenPORT=3200 node .output/index.js
and same thing. Gets the errorCannot GET /api/hello
. Pages still load.When I look at the
.output
from the deploy I see anapi/lambda
directory but no files in it. Same for thedist
folder from the build.I swear this was working before but I don't see any changes that should be breaking this. The app.ts never fires either. Any ideas why this might be?
Beta Was this translation helpful? Give feedback.
All reactions