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

Unable to compile nota documents containing code blocks #20

Open
aaronjeline opened this issue Nov 5, 2023 · 1 comment
Open

Unable to compile nota documents containing code blocks #20

aaronjeline opened this issue Nov 5, 2023 · 1 comment

Comments

@aaronjeline
Copy link

I'm unable to compile any nota document containing highlighted code. (It works fine in the nota edit mode, but nota build fails.

Here's my nota document:

%%%
import {rust} from "@codemirror/lang-rust"
%%%

@Title: Test

```rust
fn f() {
        println!("hello");
}
```

Here's my package.json:

{
        "dependencies" : {
                "@codemirror/lang-rust" : "^6.0.0"
        }
}

Error when running nota build index.nota:

[9:58:41 PM] info: Starting build...
[9:58:42 PM] info: Waiting for browser (may take ~15s the first build)...
[9:58:42 PM] info: Rendering page: index -> dist/index.html
[9:58:42 PM] info: (/index) JSHandle@error
[9:58:42 PM] info: Note: for better stack traces, try building with -g
[9:58:42 PM] error: (/index)Error: Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
    at s (http://localhost:8000//index.mjs:301:19292)
    at s (http://localhost:8000//index.mjs:301:18871)
    at s (http://localhost:8000//index.mjs:301:19470)
    at s (http://localhost:8000//index.mjs:301:18871)
    at s (http://localhost:8000//index.mjs:301:19470)
    at s (http://localhost:8000//index.mjs:301:18871)
    at Oj (http://localhost:8000//index.mjs:301:19485)
    at Zf.resolve (http://localhost:8000//index.mjs:301:18003)
    at Ze.create (http://localhost:8000//index.mjs:301:27063)
    at http://localhost:8000//index.mjs:306:52607
[9:58:44 PM] info: Cleaning up unused files...
[9:58:44 PM] info: Built in 2.20s.

(Anyway loving nota, very cool)

@willcrichton
Copy link
Collaborator

Thanks for filing this issue -- Nota is in low-maintenance mode right now while I work on the next big iteration of its design, but I will make sure to address this!

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

2 participants