My project runs normally when built locally,when deploying on Vercel, the build is successful but some pages respond with a 500 internal error.
when i change getServerSideProps to getStaticProps page get sucessful response in vercel
my code: GitHub - ucanme/nextblog
error log:
✘ [ERROR] Could not resolve "@code-hike/mdx/dist/components.cjs.js" _mdx_bundler_entry_point-98ab1dd3-5d4a-4fa0-b601-351f950fecce.mdx:2:32: 2 │ ...t {annotations, Code} from "@code-hike/mdx/dist/components.cjs.js"; ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can mark the path "@code-hike/mdx/dist/components.cjs.js" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. Node.js process exited with exit status: 1. The logs above can help with debugging the issue.