-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
NextJS 13 with Edge runtime error: exports is not defined #400
Comments
running into the same issue. |
I also encountered this issue |
I believe this is because Next.js already has an experimental URL import feature that you can use for remote files & for local files you can just use imports as is. I don't understand why Next.js even references this package in its MDX docs because the functionality this package provides should be a first-class citizen in Next.js, and it sort of is, but they don't make it obvious. The You also have to avoid certain experimental feature pitfalls with Next.js. The |
I encountered the same issue. I'd like to know if it has been resolved. |
I got the same issue. Everything work fine on localhost, until I use the "edge" runtime for vercel function. Vercel lets hobby plan only has max 10 second for serverless function. When I fetch api from OpenAI, Replicate Ai, it takes around 12 seconds to get the response. So my web is always got 504 timeout error on production. That's why I'm trying to use the edge runtime, but when I use it, it shows errors: ./node_modules/dotenv/lib/main.js:3:11 This is my route.ts: dotenv.config({ path: export const runtime = "edge"
} catch (error) { |
|
Summary
Hi! 馃憢
I've been using the library for a while now, following the docs under https://github.com/hashicorp/next-mdx-remote#react-server-components-rsc--nextjs-app-directory-support and it worked perfectly fine :)
Versions:
Recently I've encountered the below error when trying to migrate a page to use the
const runtime = "edge"
with NextJS 13. Commenting out this line solves the issue.Same applies to using
next-mdx-remote/serialize
with the edge runtime.Attempted import error: 'MDXRemote' is not exported from 'next-mdx-remote/rsc' (imported as 'MDXRemote').
What I've tried
serialize
)Reproduction
https://codesandbox.io/p/sandbox/muddy-cache-nkwsqw
or
create-next-app
next-mdx-remote
as a dependencyexport const runtime = "edge"
The text was updated successfully, but these errors were encountered: