Closed bebbi closed 3 months ago
The issue here is likely that you use export const runtime = "edge"
.
In V3 edge runtime needs to be in their own separate function and cannot be bundled inside of the default server or any node server function. (To be fair, there is only downsides in bundling a fake edge runtime into the default server)
We need to add a specific error here.
Could you try without this line ?
I've deployed it using only a call to
const site = new sst.aws.Nextjs('Web', { domain: myDomain }) // sst ion 0.0.131
without any options in an sst.config.ts
for the ion next config so I'm not sure how to act on this.
I'm not talking about the ion next config, i'm talking about the icon.tsx
file.
If you have this line export const runtime = "edge"
inside this file, you need to remove it.
The edge
runtime is useless outside of vercel or without some advanced config in open-next.config.ts
If you want more info about the open next config file you can take a look here. Just so you know, not every feature of open-next is supported in ion. (At the moment only lambda & lambda@edge are supported)
Oh sorry, I didn't realize I'd copied this from the doc example.
Without the line, and with an icon.tsx
, everything works 👍, thanks!
Probably a specific error would help, so I'm letting the closing up to you in case you wanted this issue to track that.
The specific error has been added in open-next@3.0.0-rc.9
.
At the moment we're on 3.0.0-rc.11
npx --yes open-next@3.0.0-rc.5 build
fails in my next project because I used aicon.tsx
as favicon per the documentation Removingicon.tsx
and addingicon.png
worked around the issue. (As a note,icon.tsx
worked indev
mode and showed a favicon as expected.Error:
Possibly some relation to #335 This came from this sst v3 issue