mdx-deck: mdx-deck start error with 'TypeError: Cannot read property 'internal' of null'
I’m creating a deck using the example from Zeit’s now-examples repository.
I can start a development server correctly and see the success: Building development bundle output from Gatsby, however as soon as I change a file the development server crashes with this error:
TypeError: Cannot read property 'internal' of null
- gen-mdx.js:48 payloadCacheKey
[javascript-slides]/[gatsby-plugin-mdx]/utils/gen-mdx.js:48:46
- gen-mdx.js:51 genMDX
[javascript-slides]/[gatsby-plugin-mdx]/utils/gen-mdx.js:51:43
- source-nodes.js:108 processMDX
[javascript-slides]/[gatsby-plugin-mdx]/gatsby/source-nodes.js:108:5
- source-nodes.js:158 resolve
[javascript-slides]/[gatsby-plugin-mdx]/gatsby/source-nodes.js:158:35
- gatsby-node.js:40
[javascript-slides]/[gatsby-theme-mdx-deck]/gatsby-node.js:40:24
- gatsby-node.js:47 resolveTitle
[javascript-slides]/[gatsby-theme-mdx-deck]/gatsby-node.js:47:60
not finished createPages - 0.077s
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
3 pages In Progress mdx-deck
Error: Command failed with exit code 1 (EPERM): gatsby develop --host localhost --port 8000 --open
at makeError (/Users/jackleslie/Desktop/Talks/javascript-slides/node_modules/execa/lib/error.js:59:11)
at handlePromise (/Users/jackleslie/Desktop/Talks/javascript-slides/node_modules/execa/index.js:112:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Here’s my project for reference, nothing much to see at the moment
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 20
- Comments: 18 (4 by maintainers)
Same here, the fix does not work for “mdx-deck”: “^3.0.13”
I added the following and it worked
“resolutions”: { “mdx-deck/**/gatsby”: “2.18.4” },
I’m using yarn.
I would suggest keeping this issue open until a fix is in place in the repo itself, not specific to pinning a sub-dependency version and using yarn. Looks like https://github.com/jxnblk/mdx-deck/pull/603 fixes it. Also might be a duplicate of https://github.com/jxnblk/mdx-deck/issues/595.
Fix this now, in your own project (if you use
yarn):Add the above to your package.json and run
yarnto install the working package versions.Thanks to @karlhorky #603
Also try
via @mlouage https://github.com/jxnblk/mdx-deck/issues/598#issuecomment-570532764
I’ve been running into this issue constantly on
3.0.13. Basically if I save any markdown, the server crashes.I tried the solution by @therealklanni but didn’t have any luck.
Here’s the source line:
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-mdx/utils/gen-mdx.js#L48
It looks like between saves
nodeis returned asnull.The
gatsby-plugin-mdxversion is1.0.64, which is the latest at the time of writing this.Is there a previous version that didn’t have this issue?
Yes, that’s what I do. It turned out to be more stable and flexible, for example I can configure a path prefix to deploy the presentation as github pages or in a domain containing many other pieces of content.
this seems like a dup of #595
+1
@nkuehn does pinning to the older version like in the code block below not work? Or do you not use Yarn?
Yarn Resolutions should only pin the version of
gatsbythat is a direct or transient dependency ofmdx-deck, which wouldn’t impact the other versions of Gatsby that are required by other packages in your monorepo.I conclude this this from the following text from the original Yarn Resolutions RFC:
Thank you @therealklanni
Same here 😕
+1