Mdx-deck: Fails to start on Windows 10 (build 1903)

Created on 24 Jul 2019  ·  5Comments  ·  Source: jxnblk/mdx-deck

🐛 Issue

MDX-deck fails to run with mdx-deck deck.mdx on Windows 10.

🐾 Reproduce Steps

(Failing code available here - https://github.com/dance2die/demo.mdx-error-on-windows10)

  1. npm init -y
  2. npm i -D mdx-deck
  3. Create deck.mdx with following content
# This is the title of my deck

---

# About Me

---


# The end

  1. Start the server with mdx-deck deck.mdx

Following error message shows up

C:\misc\src\throwaway\temp\mdxdeck  ([email protected]) 
λ npm start

> [email protected] start C:\misc\src\throwaway\temp\mdxdeck
> mdx-deck deck.mdx

info Deleting .cache, public
info Successfully deleted directories

success open and validate gatsby-configs - 0.109 s
success load plugins - 0.493 s
success onPreInit - 0.063 s
success initialize cache - 0.071 s
success copy gatsby files - 0.219 s
success onPreBootstrap - 0.073 s
success source and transform nodes - 0.720 s
success building schema - 0.202 s
success createPages - 0.134 s
success createPagesStatefully - 0.090 s
success onPreExtractQueries - 0.063 s
success update schema - 0.080 s
success extract queries from components - 0.261 s
success write out requires - 0.093 s
success write out redirect data - 0.066 s
success onPostBootstrap - 0.067 s
⠀
info bootstrap finished - 5.884 s
⠀
success run static queries - 0.067 s
success run page queries - 0.127 s — 2/2 36.46 queries/second


C:\misc\src\throwaway\temp\mdxdeck  ([email protected])
λ npm start

> [email protected] start C:\misc\src\throwaway\temp\mdxdeck> mdx-deck deck.mdx

info Deleting .cache, public
info Successfully deleted directories

success open and validate gatsby-configs - 0.107 s
success load plugins - 0.491 s
success onPreInit - 0.057 s
success initialize cache - 0.063 s
success copy gatsby files - 0.186 s
success onPreBootstrap - 0.070 s
success source and transform nodes - 0.600 s
success building schema - 0.235 s
success createPages - 0.121 s
success createPagesStatefully - 0.085 s
success onPreExtractQueries - 0.055 s
success update schema - 0.075 s
success extract queries from components - 0.226 s
success write out requires - 0.098 s
success write out redirect data - 0.060 s
success onPostBootstrap - 0.061 s
⠀
info bootstrap finished - 5.505 s
⠀
success run static queries - 0.058 s
success run page queries - 0.101 s — 2/2 45.84 queries/second

 ERROR #98123  WEBPACK

Generating SSR bundle failed

Unexpected token (10:4)

File: ..\@mdx-deck\themes\dots.js:10:4


 ERROR #98123  WEBPACK

Generating SSR bundle failed

Unexpected token (11:9)

File: ..\@mdx-deck\themes\syntax-highlighter-prism.js:11:9


 ERROR #98123  WEBPACK

Generating SSR bundle failed

Unexpected token (17:9)

File: ..\@mdx-deck\themes\syntax-highlighter.js:17:9


Error: Command failed with exit code 1 (Unknown system error -1): gatsby develop --host localhost --port 8000 --open
    at makeError (C:\misc\src\throwaway\temp\mdxdeck\node_modules\execa\lib\error.js:58:11)
    at handlePromise (C:\misc\src\throwaway\temp\mdxdeck\node_modules\execa\index.js:112:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `mdx-deck deck.mdx`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\dance2die\AppData\Roaming\npm-cache\_logs\2019-07-24T04_27_46_626Z-debug.log

C:\misc\src\throwaway\temp\mdxdeck  ([email protected]) 
λ 

🖼 Screenshot

image

➕ Additional Info

  1. The same steps work on Ubuntu 19.04 w/ node version 12.x
  2. Error occurs on Windows 10 with node version 10.x, 11.x, and 12.x

Most helpful comment

I believe this is due to gatsby-plugin-compile-es6-packages does not work for scoped packages in Windows.
I've investigated and raised an issue for that package, hopefully once that issue is resolve this is fixed as well!

All 5 comments

I believe this is due to gatsby-plugin-compile-es6-packages does not work for scoped packages in Windows.
I've investigated and raised an issue for that package, hopefully once that issue is resolve this is fixed as well!

Thank you @malcolm-kee for looking into the issue and filing an issue for the patch 🙂

Thanks to @malcolm-kee a fix has been merged & pushed for this dependency. v2.1.0 of the package should resolve the issue.

Confirmed: updating that package within my dependency tree to v2.1.0 resolves the issue. Have I mentioned OSS is amazing? :)

Thank you @malcolm-kee & @SeanKilleen~

Works well now~ 😀
(⚠ note for others: _delete node_modules & package-lock.json before re-installing packages_)

And yes, @SeanKilleen OSS is awesome~

thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DSchau picture DSchau  ·  5Comments

busypeoples picture busypeoples  ·  4Comments

janhesters picture janhesters  ·  3Comments

busypeoples picture busypeoples  ·  5Comments

trevordmiller picture trevordmiller  ·  3Comments