mdx-deck: Dev build fails when rebuilding presentation
Hello! I have a very simple presentation that builds successfully the first time, but then fails to rebuild once a change is made. If you simply save the file, the build does not fail, but any modification results in the following error:
Error: Command failed with exit code 1 (EPERM): gatsby develop --host localhost --port 8000 --open
at makeError (/app/node_modules/execa/lib/error.js:59:11)
at handlePromise (/app/node_modules/execa/index.js:112:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
The code is running within a docker container. Here’s the docker-compose file:
version: "3.6"
services:
present:
image: node
volumes:
- ./:/app
ports:
- "8000:8000"
working_dir: /app
entrypoint: ["npm"]
command: ["start"]
npm:
image: node
volumes:
- ./:/app
working_dir: /app
entrypoint: ["npm"]
command: ["--version"]
The present service issues the following npm command as defined in the “package.json” file:
"start": "mdx-deck presentation.mdx"
The actual presentation, saved as “presentation.mdx”, is as follows:
# Presentation Title
---
# About Me
Here’s how to setup and reproduce the issue (docker commands are run with sudo on my machine):
- Install the framework:
docker-compose run --rm npm i -D mdx-deck - Run the presentation service:
docker-compose run --rm --service-ports present - The build will finish and you can see the presentation in the browser of the host
- Save the “presentation.mdx” file without making any modifications
- Notice that the
infostatement is logged, but the service remains stable - Modify the “presentation.mdx” file and save
- The error mentioned above appears and the docker service dies
I noticed issue #416 which had a very similar error, but the “package-lock.json” file shows the gatsby-plugin-compile-es6-packages package as being installed at version “2.1.0”.
I also tested making the changes within the container to eliminate the possibility of filesystem issues. No matter how the presentation is modified, the error still occurs.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 18
- Comments: 17 (2 by maintainers)
For anybody looking for a quick workaround in the meantime, just add this to your
package.json(if you’re using yarn):@jxnblk opened a PR to pin the Gatsby version to fix this here: #603
Our organization is also running into this on multiple slide decks since upgrading to v3.
Thanks so much @karlhorky. I can confirm doing no changes but pulling up the version resolves the issue, had no issues in the monorepo too (but it had only one package using mdx-deck).
agreed. I’ve since narrowed the introduction of the bug to gatsby v2.18.5, but haven’t been able to gleam anything more.
Either way, the issue does not seem to be with this project itself.
Fix here is either waiting for fix in gatsby, or reverting gatsby to 2.18.4