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

Doesnt' work with MDX-Deck v2.3.2 #59

Closed
iamchathu opened this issue May 19, 2019 · 1 comment
Closed

Doesnt' work with MDX-Deck v2.3.2 #59

iamchathu opened this issue May 19, 2019 · 1 comment

Comments

@iamchathu
Copy link

These are my package.json devDependaices

"devDependencies": {
    "mdx-deck": "^2.3.2",
    "mdx-deck-code-surfer": "^0.5.5",
    "raw-loader": "^2.0.0",
    "styled-components": "^4.2.0"
  },

My presentation.mdx looks like following

export { default as theme } from '../theme';

# Auth0 as Identity Management

---

## Second Slide

---

import { CodeSurfer } from 'mdx-deck-code-surfer';

<CodeSurfer
  title='Lines'
  code={require('!raw-loader!./my-snippet.js')}
  steps={[
    { notes: 'Use ⬆️ and ⬇️ keys' },
    { lines: [6], notes: 'Highlight a single line ⬇️' },
    { lines: [5, 7, 8], notes: '... or multiple lines ➡️' },
  ]}
/>

---

export { components } from 'mdx-deck-code-surfer';

```java FizzBuzz
public String fizzBuzz(int n){
  String s = "";
  if (n == 0)
    return s;
  if((n % 5) == 0)
    s = "Buzz" + s;
  if((n % 3) == 0)
    s = "Fizz" + s;
  if (s.equals(""))
    s = n + "";
  return fizzBuzz(n-1) +  s;
}
----
* > Copy pasted from rosettacode.org
1, 3 > Some lines
1:4, 6, 8:10 > Also ranges
2, 4[1:6], 5[2, 4, 6:9] > Some tokens
```(this bracketed content just to post in gihub)
---


I have my-snippet.js file on root of the folder. Both ways gives

Uncaught TypeError: (0 , _mdxDeck.withDeck) is not a function
    at eval (deck-code-surfer.js:287)
    at Object../node_modules/mdx-deck-code-surfer/dist/deck-code-surfer.js (main.js:4734)
    at __webpack_require__ (main.js:724)
    at fn (main.js:101)
    at eval (index.js:7)
    at Object../node_modules/mdx-deck-code-surfer/dist/index.js (main.js:4758)
    at __webpack_require__ (main.js:724)
    at fn (main.js:101)
    at eval (presentation.mdx:6)
    at Module../presentation.mdx (main.js:7935)

@karlhorky
Copy link

See #53 and #58. v2 is not supported yet.

@pomber pomber closed this as completed Dec 10, 2019
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

3 participants