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
I just ran a few tests on an app I have running on tf-next 0.11.2.
the app uses urql (which uses a lib called wonka)
when deploying using next@11 everything works fine but when I deploy with next@12 all I get from the NEXT_PAGE_LAMBDA_0 logs is ERROR Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/wonka/dist/wonka.mjs' imported from /var/task/node_modules/@urql/core/dist/urql-core.mjs
When I explore the lambda's deployment package I can see that indeed wonka.mjs does not exist but a wonka.js exists.
I tried doing the same deploy to Vercel and it works fine, therefore I think something (maybe the node version ?) is not on par but I can't seem to find what and how to fix it.
any idea ?
The text was updated successfully, but these errors were encountered:
Yeah, Next.js 12 has support for esm while our module currently hasn't.
Since Vercel also uses Lambda (And the same Node.js version under the hood as this module) the problem is probably located in the the layer we use between Next.js and Lambda, which currently doesn't support esm.
You could probably workaround this by adding the following setting to your next.config.js:
Hello,
I just ran a few tests on an app I have running on tf-next 0.11.2.
the app uses
urql
(which uses a lib calledwonka
)when deploying using next@11 everything works fine but when I deploy with next@12 all I get from the NEXT_PAGE_LAMBDA_0 logs is
ERROR Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/wonka/dist/wonka.mjs' imported from /var/task/node_modules/@urql/core/dist/urql-core.mjs
When I explore the lambda's deployment package I can see that indeed
wonka.mjs
does not exist but awonka.js
exists.I tried doing the same deploy to Vercel and it works fine, therefore I think something (maybe the node version ?) is not on par but I can't seem to find what and how to fix it.
any idea ?
The text was updated successfully, but these errors were encountered: