# ! Rushabh | Linux Shill - lib/import-eecircuit-... Channel: #contributor Source: https://discord.com/channels/1233487248129921135/1519809315601650036 Started: 2026-06-25T20:59:37.993000+00:00 Last activity: 2026-06-27T17:43:08.195000+00:00 ## ! Rushabh | Linux Shill — 2026-06-25T20:59:37.531000+00:00 lib/import-eecircuit-engine.ts loads the 21 MB engine by fetching it from the CDN, wrapping the source in a Blob, and calling import(blob:…). Browsers and Bun support importing a blob: URL; Node's ESM loader does not — it throws "Only URLs with a scheme in: file, data, and node are supported… Received protocol 'blob:'". So any consumer that runs simulations under Node (e.g. svg.tscircuit.com's Next.js Node runtime) fails. I verified this end-to-end: with a file:// temp-file import the same circuit produces both transient graphs under Node. Therefore svg.tscircuit.com fails https://svg.tscircuit.com/?svg_type=schsim&code=H4sIAJSWPWoAA21S0WqDMBT9leBeWthau64vZQqF7mGwraPrZA%2FCSPVqA5qEmzg6xH9fok2Vrj55z8m5956T1B7jKRwnWh29pQdHKVCTFDJaFZqMxiQIySjmhDzuBcWUoKg04%2FmaKbovIA0tZcgfUWiagxIVJkA4LSGIvWgWe%2BTEmHK2iEytksNXUN%2FNGzJ1YlqWoAG7ijj16tXIHZaIQqABb7LMN19P5EjlwWwjC%2Fr71gmfv182q%2FVQyzkkmgmugrp2KCFSqCWJvUk0IyGZSMbNvNue5pC39PYa3TTd39kDgmJKC3Tbb633DqQ8scj92bzxngmhJTKuDeE%2F%2BJazrU7NNFKTYoaiNHS%2FgD2lhYXOK18IT2FLFHu4iDPafO6u5DmfLZIs%2BxeW2rVzht7dCYQMEIyn7shwlT4Td7OcFiJXrKwKai%2FA9UgrbGv7KkrV99ashHfADw3SUr5fDUglWQJPPGfc%2BuF5Ww%2BHmoHT9pWGY6%2F5A0JngCrYAgAA for ```ts .pin1", neg: ".R1 > .pin1", }} /> ``` <@778624824875941908> ## ! Rushabh | Linux Shill — 2026-06-25T21:00:23.228000+00:00 [attachment] Attachment: image.png — https://community.tscircuit.com/media/1519809507096789002 ## shibo — 2026-06-25T21:03:49.785000+00:00 see how eval does it in runframe? ## shibo — 2026-06-25T21:42:59.068000+00:00 actually I noticed no spice simulation works in the docs ## shibo — 2026-06-25T21:43:01.694000+00:00 <@452450065941004289> ## shibo — 2026-06-25T21:43:04.081000+00:00 it used to work ## ! Rushabh | Linux Shill — 2026-06-25T21:43:24.494000+00:00 ik ## ! Rushabh | Linux Shill — 2026-06-25T21:43:37.263000+00:00 the issue is in svg.tscircuit.com ## ! Rushabh | Linux Shill — 2026-06-25T22:48:45.396000+00:00 <@778624824875941908> this broke it https://github.com/tscircuit/ngspice-spice-engine/pull/22 ## ! Rushabh | Linux Shill — 2026-06-25T22:48:48.366000+00:00 <@809856037376491570> ## ! Rushabh | Linux Shill — 2026-06-25T22:50:09.154000+00:00 i think we should revert back to package imports ## shibo — 2026-06-25T22:50:52.546000+00:00 why? it works in eval, runframe and the cli, we just gotta figure out why it failed in svg.tscircuit.com ## ! Rushabh | Linux Shill — 2026-06-25T22:51:22.527000+00:00 hmm ## ! Rushabh | Linux Shill — 2026-06-25T22:55:41.595000+00:00 found the error ``` Compilation Error Simulation failed for"simulation_experiment_0": OnlyURLs with a scheme in: file,data, and node are supported bythe default ESM loader. Receivedprotocol 'blob:' ``` ## ! Rushabh | Linux Shill — 2026-06-25T23:03:35.498000+00:00 - `runframe` works because browser - `cli` works because temp-file import ## shibo — 2026-06-25T23:17:48.707000+00:00 <@757706909351411845> ## Seve — 2026-06-25T23:18:54.952000+00:00 ok so basically we don't work it NODE right now, we work in browser and bun is that right? ## Seve — 2026-06-25T23:19:08.295000+00:00 we might work in newer versions of node- <@452450065941004289> can you replicate locally ## Seve — 2026-06-25T23:20:09.160000+00:00 also RE: svg.tscircuit.com, we should preload the ngspice library, i think we might have done this for other libraries, should not be a big deal? ## Seve — 2026-06-25T23:20:34.174000+00:00 i.e. svg.tscircuit.com or basically ANY server shouldn't be loading from CDN- it should be a dev dep that is packaged when the server is deployed ## ! Rushabh | Linux Shill — 2026-06-26T13:31:08.288000+00:00 https://github.com/tscircuit/svg.tscircuit.com/pull/1686 <@809856037376491570> ## shibo — 2026-06-26T13:37:20.177000+00:00 did you reproduce the issue locally before implementing the fix? ## ! Rushabh | Linux Shill — 2026-06-26T13:46:03.425000+00:00 no, inspected how `@tscircuit/eval` does it and copied the logic ## ! Rushabh | Linux Shill — 2026-06-26T13:46:56.170000+00:00 https://svg-tscircuit-jvr3rmmex-tscircuit.vercel.app/ ## shibo — 2026-06-26T13:46:57.227000+00:00 we need a repro first, how could we know if this fix worked? ## ! Rushabh | Linux Shill — 2026-06-26T13:47:24.410000+00:00 https://svg-tscircuit-jvr3rmmex-tscircuit.vercel.app/ i tested it here after deployment ## shibo — 2026-06-26T13:47:36.048000+00:00 maybe the issue is not present locally, but only in live deployment ## ! Rushabh | Linux Shill — 2026-06-26T13:47:42.534000+00:00 yes ## shibo — 2026-06-26T13:47:46.911000+00:00 live deployment sometimes is not the same as the preview deployment ## shibo — 2026-06-26T13:47:51.143000+00:00 so we must reproduce the issue first ## shibo — 2026-06-26T13:48:02.431000+00:00 basically revert your change, see if you get the issue, then push it ## ! Rushabh | Linux Shill — 2026-06-26T13:52:48.738000+00:00 This is for the curent pr: https://svg-tscircuit-jvr3rmmex-tscircuit.vercel.app/ This is the live deployment link for previous pr: https://svg-tscircuit-1crdasmao-tscircuit.vercel.app/ I tested ```ts .pin1", neg: ".R1 > .pin1", }} /> ``` Attachment: image.png — https://community.tscircuit.com/media/1520064291661807686 Attachment: image.png — https://community.tscircuit.com/media/1520064292123054090 ## shibo — 2026-06-26T13:53:32.744000+00:00 cool ## shibo — 2026-06-26T13:57:25.767000+00:00 <@809856037376491570> https://github.com/tscircuit/svg.tscircuit.com/pull/1686 ## shibo — 2026-06-26T14:34:05.437000+00:00 <@757706909351411845> ## shibo — 2026-06-27T11:19:31.834000+00:00 <@452450065941004289> can you double check it it worked in the live deployment? ## ! Rushabh | Linux Shill — 2026-06-27T12:07:57.656000+00:00 Yes, Its is not working for svg.tscircuit.com , but it works in https://svg-tscircuit-2mm13se43-tscircuit.vercel.app/ hey <@809856037376491570> is there any difference of environment between these two links in vercel ## ! Rushabh | Linux Shill — 2026-06-27T12:08:17.166000+00:00 pr:https://github.com/tscircuit/svg.tscircuit.com/pull/1686 ## Rishabh — 2026-06-27T12:13:00.625000+00:00 The last deployment has failed, run `build` locally to figure out Attachment: image.png — https://community.tscircuit.com/media/1520401564068741200 ## shibo — 2026-06-27T16:03:36.952000+00:00 <@452450065941004289> what is this commit? Attachment: image.png — https://community.tscircuit.com/media/1520459597457133821 ## shibo — 2026-06-27T16:03:56.613000+00:00 it's not the latest ## ! Rushabh | Linux Shill — 2026-06-27T16:34:28.894000+00:00 check this dd0e34c ## ! Rushabh | Linux Shill — 2026-06-27T16:34:55.024000+00:00 https://github.com/tscircuit/svg.tscircuit.com/actions/runs/28257068828 ## ! Rushabh | Linux Shill — 2026-06-27T16:35:26.786000+00:00 this is newer commit on my test branch ## shibo — 2026-06-27T16:37:44.905000+00:00 the thing is that main builds locally, why does it not build in vercel? maybe it does actually build if the snapshot sent by <@809856037376491570> is not from main ## ! Rushabh | Linux Shill — 2026-06-27T16:38:09.819000+00:00 that one is not from main ## ! Rushabh | Linux Shill — 2026-06-27T16:39:09.387000+00:00 it also fails locally , its just something i was testing locally, the build started cause i created a pr as i wanted to know how it behaves in prod ## ! Rushabh | Linux Shill — 2026-06-27T16:39:42.302000+00:00 <@809856037376491570> needs to see the latest build on main branch ## Rishabh — 2026-06-27T16:40:03.977000+00:00 what's happening here ## Rishabh — 2026-06-27T16:40:10.140000+00:00 Ohh I sent the wrong one? ## ! Rushabh | Linux Shill — 2026-06-27T16:40:26.962000+00:00 [attachment] Attachment: image.png — https://community.tscircuit.com/media/1520468867158245376 ## Rishabh — 2026-06-27T16:40:39.002000+00:00 yeah, I sent the preview deployment which failed. the main is passing Attachment: image.png — https://community.tscircuit.com/media/1520468917682831430 ## ! Rushabh | Linux Shill — 2026-06-27T16:41:29.047000+00:00 but sch sim is not working for svg.tscircuit.com , but it works in https://svg-tscircuit-2mm13se43-tscircuit.vercel.app/ ## shibo — 2026-06-27T16:41:51.447000+00:00 you gotta reproduce somehow ## shibo — 2026-06-27T16:41:58.829000+00:00 at least now we know it's not a build issue ## ! Rushabh | Linux Shill — 2026-06-27T16:43:41.253000+00:00 we need to improve the error mesage so we can understand the problem better Attachment: image.png — https://community.tscircuit.com/media/1520469682191073330 ## shibo — 2026-06-27T16:52:40.386000+00:00 you got a PR? ## ! Rushabh | Linux Shill — 2026-06-27T16:53:07.011000+00:00 yeah, on it ## ! Rushabh | Linux Shill — 2026-06-27T17:37:27.701000+00:00 So here is what i found I added better errros https://github.com/tscircuit/svg.tscircuit.com/pull/1688 live link i got for my pr (works perfectly fine): https://svg-tscircuit-6ty0d4oh2-tscircuit.vercel.app/ my vercel deployment of the same branch (errors): https://svg-tscircuit-pxjw8v8l2-rushabh1134s-projects.vercel.app/ Attachment: image.png — https://community.tscircuit.com/media/1520483214840299732 ## ! Rushabh | Linux Shill — 2026-06-27T17:38:59.576000+00:00 <@809856037376491570> any idea why this might occur ## Seve — 2026-06-27T17:40:33.746000+00:00 Try redeploy? Upgraded node to 24 Attachment: image0.jpg — https://community.tscircuit.com/media/1520483995123453972 ## ! Rushabh | Linux Shill — 2026-06-27T17:42:04.005000+00:00 i am already using node 24.x in my deployment ## Seve — 2026-06-27T17:42:48.584000+00:00 I updated the svg tscircuit com setting- that is the point ## Seve — 2026-06-27T17:43:08.195000+00:00 Now it matches your version, but needs an update to redeploy