Excalidraw installation issue

Hello SB community.

After few updates I’m trying to install excalidraw from std Library and library manager.
Unfortunatly it install correctly teh .md file but does not seems to install the xxx.js file I was used to see.

I’ve looked for it in the entire space but do not find it.
So as a result no slash command or command appears…

As someone faced this and how can I solve it ?

My guess is that the .js file was installed, but Plugs: update command deleted it (bug in SB 2.3.0). You have to delete .md file and reinstall library. Edge version of SB is fixed.

2 Likes

Hmmm already tried this but did once again.
I removed on filesystem Logesh… stuff (with silverbullet-excalidraw.md and the directory)
Check docker-image: ghcr.io/silverbulletmd/silverbullet:latest
docker compose down, pull, up -d …
Then update pulgs, index, hard refresh.
Excalidraw library is correctly removed → Ok

hit library manager and install excalidraw.
I have this error :


Then done…

Update, reindex, hard refresh → Yet still only .md file no .js
Guess it is more or less related to the error mentionned above

I have try to delete from library manager it is says file does not exists, nothing else is done (need to remove from filsesystem)…

:roll_eyes:

I don’t use docker but I think silverbullet:latest is latest release (2.3.0) and silverbullet:v2 is edge.

Hello @kaiser2k20 ,

Thanks for your feed back.
Change to V2, same update (rm plugs, directory, hard refrash after pulling v2).
same message

Same issue only .md copied:

Also I’m working on a windows Volume for this docker container (easier to go through SB filesystem since my server is a windows one → Do it matter ? )

:neutral_face:

Quickly launched a fresh container with volume remaining inside the container → Same issue (ie not related to Windows)

I’m on silverbullet:v2 inside docker. I just tried to delete Library/LogeshG5 directory and installed from Library manager. Both js and md files got downloaded.

What do you see in the browser console?

In the meanwhile, As a workaround you can download excalidraw.plug.js (edge version) from github directly into Library/LogeshG5.

This one is a permanent error :(does not seem to cause issue)

[Client] Error evaluating script: Parse error at pos 73 for script: silverbullet.registerEventListener({name= "editor:pageLoaded"}, async () => {
  const text = await editor.getText();
  if(!text.startsWith("---")) {
    console.log("No frontmatter, skipping folding");
    return;
  }
  const pos = await editor.getCursor();
  await editor.moveCursor(0);
  await editor.fold();
  await editor.moveCursor(pos);
  console.log("Folded frontmatter.")
}); Error: Parse error at pos 73
    xd tree.ts:214
    xd tree.ts:229
    xd tree.ts:229
    xd tree.ts:229
    xd tree.ts:229
    nF parse.ts:879
    C2 parse.ts:870
    reload space_lua.ts:44
    loadLuaScripts client_system.ts:210
    init client.ts:268
    async* boot.ts:240
    C1 async.ts:152
    <anonymous> boot.ts:28
    <anonymous> boot.ts:351
logger.ts:43:35
    t logger.ts:43
    reload space_lua.ts:61
    loadLuaScripts client_system.ts:210
    init client.ts:268
    <anonyme> boot.ts:240
    C1 async.ts:152
    <anonyme> boot.ts:28
    <anonyme> boot.ts:351

Then when hitting install lib :


XHRGET
https://192.168.1.25:8443/.fs/Library/LogeshG5/silverbullet-excalidraw.md
[HTTP/1.1 404 Not Found 0ms]

XHRGET
https://192.168.1.25:8443/.fs/Library/LogeshG5/excalidraw.plug.js
[HTTP/1.1 404 Not Found 0ms]

XHRPUT
https://192.168.1.25:8443/.fs/Library/LogeshG5/excalidraw.plug.js
[HTTP/1.1 413 Request Entity Too Large 0ms]

[Client] Error during : TypeError: can't access property "lastModified", i is undefined
    writeFile evented_space_primitives.ts:199
    writeFile space.ts:123
    syscall system.ts:138
    localSyscall system.ts:112
    l space_lua_api.ts:44
    call runtime.ts:305
    c1 runtime.ts:793
    h eval.ts:626
    o eval.ts:658
    bh eval.ts:664
    $t eval.ts:422
    ke eval.ts:1678
    M eval.ts:1269
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    ke eval.ts:1304
    o eval.ts:1936
    promise callback*o eval.ts:1923
    ke eval.ts:2017
    M eval.ts:1269
    ke eval.ts:1304
    o eval.ts:1471
    ke eval.ts:1477
    M eval.ts:1269
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    ke eval.ts:1304
    o runtime.ts:244
    call runtime.ts:271
    c1 runtime.ts:793
    h eval.ts:626
    o eval.ts:658
    bh eval.ts:664
    $t eval.ts:422
    ke eval.ts:1678
    M eval.ts:1269
    M eval.ts:1287
    promise callback*M eval.ts:1276
    ke eval.ts:1304
    o runtime.ts:244
    call runtime.ts:271
    Be runtime.ts:1100
    c1 runtime.ts:759
    h eval.ts:626
    o eval.ts:658
    bh eval.ts:664
    $t eval.ts:422
    ke eval.ts:1678
    M eval.ts:1269
    ke eval.ts:1304
    o eval.ts:1471
    ke eval.ts:1477
    M eval.ts:1269
    ke eval.ts:1304
    o eval.ts:1471
client.js:29:11474
    t logger.ts:43
    reportError client.ts:581
    <anonyme> debug.ts:2
    (Asynchrone : EventListener.handleEvent)
    <anonyme> debug.ts:1
    <anonyme> boot.ts:351
Uncaught (in promise) TypeError: can't access property "lastModified", i is undefined
    writeFile evented_space_primitives.ts:199
    writeFile space.ts:123
    syscall system.ts:138
    localSyscall system.ts:112
    l space_lua_api.ts:44
    call runtime.ts:305
    c1 runtime.ts:793
    h eval.ts:626
    o eval.ts:658
    bh eval.ts:664
    $t eval.ts:422
    ke eval.ts:1678
    M eval.ts:1269
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    ke eval.ts:1304
    o eval.ts:1936
    promise callback*o eval.ts:1923
    ke eval.ts:2017
    M eval.ts:1269
    ke eval.ts:1304
    o eval.ts:1471
    ke eval.ts:1477
    M eval.ts:1269
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    M eval.ts:1287
    promise callback*M eval.ts:1276
    ke eval.ts:1304
    o runtime.ts:244
    call runtime.ts:271
    c1 runtime.ts:793
    h eval.ts:626
    o eval.ts:658
    bh eval.ts:664
    $t eval.ts:422
    ke eval.ts:1678
    M eval.ts:1269
    M eval.ts:1287
    promise callback*M eval.ts:1276
    ke eval.ts:1304
    o runtime.ts:244
    call runtime.ts:271
    Be runtime.ts:1100
    c1 runtime.ts:759
    h eval.ts:626
    o eval.ts:658
    bh eval.ts:664
    $t eval.ts:422
    ke eval.ts:1678
    M eval.ts:1269
    ke eval.ts:1304
    o eval.ts:1471
    ke eval.ts:1477
    M eval.ts:1269
    ke eval.ts:1304
    o eval.ts:1471
client.js:116:9645

Copying the js lib directly in the folder do the correctly… I can live with that no real pb for me.
Thanks

Did you by any chance paste some space script (v1 code) into a space-lua block somewhere?

silverbullet.registerEventListener suggests this. I’d remove that whole thing wherever it is (there is probably a hint just before that parse error report in your console). Not sure what this breaks.

Hello,

No as far as I know. But with new fresh instance and empty space I have the same issue.
Yet while I tested with Edge & Chrome I had the ServiceWorker issue. I’m working most of the time with Firefox without this issue (never faced issue)
Main reason is because I’m using self authentified certificate on LAN without internal DNS with nginx (ip access).
While Firefox remains silent on this issue, this is maybe the reason ? (notice that other libraries such as silversearch installs correctly)