Skip to content

Receiving a "docs is not iterable" error / Map file not being generated #857

Answered by danpiths
danpiths asked this question in Q&A
Discussion options

You must be logged in to vote

ohh got it so for now i manually check for dev environment using process.env.NODE_ENV === "development" and then push to process.argv the value "dev" inside the next.config.mjs file before calling createMDX. i didn't have an idea where the check was happening and was therefore not able to make out where i needed to do this.

const isEnvDev = process.env.NODE_ENV === "development";
isEnvDev && process.argv.push("dev")
const withMDX = createMDX();

a hacky workaround but it works so yay! 🎉

thank you again for all the help and for all the efforts put into maintaining this project 🙌🏻 . appreciate it a lot :)

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@danpiths
Comment options

@danpiths
Comment options

@fuma-nama
Comment options

@danpiths
Comment options

Answer selected by danpiths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants