Skip to content

getStaticProps unified Nextjs error must use import to use ES Modules #152

Answered by ChristianMurphy
crisjumbo asked this question in Q&A
Discussion options

You must be logged in to vote

Unified 10 uses ESM https://github.com/unifiedjs/unified/releases/tag/10.0.0 this is a planned part of the latest release #121
For an introduction to using ESM packages see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
In particular the workaround for Next js https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#gistcomment-3760583
Next is working on fixing ESM support, and the fixes should part of the next release vercel/next.js#27069

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChristianMurphy
Comment options

Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
🏗 area/tools This affects tooling
2 participants