-
Notifications
You must be signed in to change notification settings - Fork 67
Preview mode broken in Next 10.0.2 with target: "serverless": TypeError: e[t] is not a function #99
Comments
Hi @fverloop, Thanks for flagging this! I recently tried to switch to Next v10 for our next-on-netlify tests and noticed that all the preview-related tests were indeed failing. From my understanding, this seems to be a bug in Next.js that affects You can solve this by switching to Difference between the two modes: In serverless-target mode, Next.js inlines all dependencies into a single .js file, leading to smaller file sizes and minimal dependencies, but causing issues with non-JS code (binaries, for example). In experimental-serverless-trace-target mode, Next.js does not inline dependencies and instead uses Do you want to try that and report back? 😊 |
Thanks for the detailed answer! I've tried switching to Is there another simple solution we could explore? FWIW preview mode worked perfectly on |
@FinnWoelm I'm experiencing the same as @fverloop but I can't even get
I'll raise a separate issue about this.. |
@lqze This is probably a separate issue. I think the error message should indicate a way to solve this:
Is |
@ehmicky Yeah this is definitely something funky with Netlify and how things are named or path'd It is in my app's root After adding it to my app
It's as if it cant resolve any deps or something in the opt folder? Or it's not able to correctly path to it? My package.json is the following:
I've removed the I know konva is a dep of
|
hey all! i'm going to close this issue in favor of #120, which groups several please feel free to re-open this issue if you think #120 does not suffice or if there's a specific piece separate from experimental-serverless-trace that still needs addressing. |
@lindsaylevine I understand that #120 addresses all issues with |
@afzalsayed96 that is a very good question and need time to think about it. |
Hey @afzalsayed96, great point! This issue is on Next.js' end. We just traced the error down and identified a solution. This has been filed here: vercel/next.js#20575 (in case you're curious about the details 😊). I'm reopening this issue, so we can track progress on the issue in the next.js repo. Note that there are currently three possible work-arounds, which I'm happy to expand on, if you'd like:
|
according to @FinnWoelm , this will be resolved in the next release of Next!!! :) |
next 10.0.6 is out! i just confirmed this works with next 10.0.6 and latest next-on-netlify for both targets (serverless and experimental-serverless-trace). please comment if you happen to still being have issues! <3 |
Since we've switched to the latest version of next (10.0.2), preview mode has been broken. Everything builds successfully, but when we load our
/api/preview
endpoint we get the following error:The text was updated successfully, but these errors were encountered: