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

Cannot use in SvelteKit #139

Closed
Manuelbaun opened this issue Dec 17, 2021 · 5 comments
Closed

Cannot use in SvelteKit #139

Manuelbaun opened this issue Dec 17, 2021 · 5 comments

Comments

@Manuelbaun
Copy link

Hi Guys,

your bytemd looks very cool and I like to use it in a SvelteKit project. Unfortunately I cannot make it work. I get that error :

The requested module '/node_modules/.pnpm/rehype-raw@5.1.0/node_modules/rehype-raw/index.js?v=5165e040' does not provide an export named 'default'
SyntaxError: The requested module '/node_modules/.pnpm/rehype-raw@5.1.0/node_modules/rehype-raw/index.js?v=5165e040' does not provide an export named 'default'

Any idea how to resolve that. I tried the suggested setup.

<script>
  import { Editor, Viewer } from 'bytemd';
  import gfm from '@bytemd/plugin-gfm';

  let value;
  const plugins = [
    gfm(),
    // Add more plugins here
  ];

  function handleChange(e) {
    value = e.detail.value;
  }
</script>

<template>
  <Editor {value} {plugins} on:change={handleChange} />
</template>
@codart1
Copy link

codart1 commented Feb 13, 2022

I got the same issue

@benmccann
Copy link

@kotx
Copy link

kotx commented Feb 26, 2022

Duplicate of #96

Are you sure this is the same issue? The error messages are slightly different.

@benmccann
Copy link

There's a few different issues involved. I posted a summary on the other issue. See here: https://github.com/bytedance/bytemd/issues/96#issuecomment-1054538106

@pd4d10
Copy link
Owner

pd4d10 commented Mar 26, 2022

Duplicate of #96

Let's track it there

@pd4d10 pd4d10 closed this as completed Mar 26, 2022
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