Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Getting Started" steps do not work #818

Open
callumlocke opened this issue Mar 25, 2022 · 4 comments
Open

"Getting Started" steps do not work #818

callumlocke opened this issue Mar 25, 2022 · 4 comments

Comments

@callumlocke
Copy link

callumlocke commented Mar 25, 2022

First time user. MDX Deck looks great... But I just followed the Getting Started steps precisely (in a new, blank project, nothing weird going on), and npm start just errors out after a few seconds.

My setup:

  • Node v17.8.0 (the current stable version)
  • MacBook Pro M1 (14-inch, 2021)

❯ npm start
TERMINAL OUTPUT
> start
> mdx-deck deck.mdx

info Deleting .cache, public,
/Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/node_modules/.cache/babel-loader,
/Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/node_modules/.cache/terser-webpack-plugin
info Successfully deleted directories

/Users/callum/code/decks/my-first-deck/node_modules/gatsby-recipes/dist/graphql-server/server.js:52
var remarkMdx = require('remark-mdx');
                ^

Error [ERR_REQUIRE_ESM]: require() of ES Module
/Users/callum/code/decks/my-first-deck/node_modules/gatsby-recipes/node_modules/remark-mdx/index.js from
/Users/callum/code/decks/my-first-deck/node_modules/gatsby-recipes/dist/graphql-server/server.js not supported.
Instead change the require of index.js in
/Users/callum/code/decks/my-first-deck/node_modules/gatsby-recipes/dist/graphql-server/server.js to a dynamic
import() which is available in all CommonJS modules.
    at Object.<anonymous>
(/Users/callum/code/decks/my-first-deck/node_modules/gatsby-recipes/dist/graphql-server/server.js:52:17) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v17.8.0


success open and validate gatsby-configs - 0.028s
success load plugins - 0.129s
success onPreInit - 0.013s
success initialize cache - 0.004s
success copy gatsby files - 0.056s
success onPreBootstrap - 0.008s
success createSchemaCustomization - 0.004s
success Checking for changed pages - 0.001s
success source and transform nodes - 0.031s
success building schema - 0.099s
info Total nodes: 35, SitePage nodes: 2 (use --verbose for breakdown)
success createPages - 0.010s
success Checking for changed pages - 0.000s
success createPagesStatefully - 0.017s
success update schema - 0.007s
success write out redirect data - 0.001s
success onPostBootstrap - 0.001s
info bootstrap finished - 1.691s
success onPreExtractQueries - 0.000s
success extract queries from components - 0.054s
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/dev-404-page.js
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/redirects.json
info added directory at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/caches/prod-404
info added directory at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/caches/dev-404-page
success write out requires - 0.002s
success run page queries - 0.010s - 2/2 198.68/s
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/async-requires.js
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/match-paths.json
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/json/_dev-404-page_.json
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/json/_.json
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/sync-requires.js
success building schema - 0.053s
info Total nodes: 44, SitePage nodes: 2 (use --verbose for breakdown)
success createPages - 0.001s
success Checking for changed pages - 0.000s
success update schema - 0.006s
success onPreExtractQueries - 0.000s
success extract queries from components - 0.008s
success write out requires - 0.001s
info added directory at
/Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/caches/webpack-theme-component-shadowing
info added directory at
/Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/caches/gatsby-plugin-compile-es6-packages
info added directory at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/webpack
info added directory at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/webpack/babel
info added file at /Users/callum/code/decks/my-first-deck/node_modules/mdx-deck/.cache/webpack/babel/a3eed5463e0710b1
3a3288bce4a99fb6.json.gz

 ERROR

error:0308010C:digital envelope routines::unsupported



  Error: error:0308010C:digital envelope routines::unsupported

  - hash:67 new Hash
    node:internal/crypto/hash:67:19

  - node:crypto:135 Object.createHash
    node:crypto:135:10

  - createHash.js:135 module.exports
    [my-first-deck]/[webpack]/lib/util/createHash.js:135:53

  - NormalModule.js:417 NormalModule._initBuildHash
    [my-first-deck]/[webpack]/lib/NormalModule.js:417:16

  - NormalModule.js:471 handleParseError
    [my-first-deck]/[webpack]/lib/NormalModule.js:471:10

  - NormalModule.js:503
    [my-first-deck]/[webpack]/lib/NormalModule.js:503:5

  - NormalModule.js:358
    [my-first-deck]/[webpack]/lib/NormalModule.js:358:12

  - LoaderRunner.js:373
    [my-first-deck]/[loader-runner]/lib/LoaderRunner.js:373:3

  - LoaderRunner.js:214 iterateNormalLoaders
    [my-first-deck]/[loader-runner]/lib/LoaderRunner.js:214:10

  - LoaderRunner.js:221 iterateNormalLoaders
    [my-first-deck]/[loader-runner]/lib/LoaderRunner.js:221:10

  - LoaderRunner.js:236
    [my-first-deck]/[loader-runner]/lib/LoaderRunner.js:236:3

  - LoaderRunner.js:111 context.callback
    [my-first-deck]/[loader-runner]/lib/LoaderRunner.js:111:13

  - index.js:59
    [my-first-deck]/[babel-loader]/lib/index.js:59:71


not finished Building development bundle - 0.528s

Error: Command failed with exit code 1: gatsby develop --host localhost --port 8000 --open
    at makeError (/Users/callum/code/decks/my-first-deck/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/callum/code/decks/my-first-deck/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
@c0h1b4
Copy link

c0h1b4 commented Mar 31, 2022

This is a defunct project. It is no use banging in the wall to make it work with updated technology like new versions of gatsby or nodejs.
If you want to use it, you have to stick to old versions of node and gatsby.

@Jossdz
Copy link

Jossdz commented Apr 7, 2022

@c0h1b4 which version do you recommend?

@chrislacey89
Copy link

@Jossdz take a look at this example: https://codesandbox.io/s/github/jxnblk/mdx-deck/tree/master/examples/syntax-highlighting?file=/deck.mdx. I was able to get this working with theme imports using node v16.14.2

@FlorianCassayre
Copy link

I was able to make it work using an existing package-lock.json, namely this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants