using createResource on node

I am trying to create a filesystem primitive that abstracts different file systems (virtual on localStorage, typescript-vfs, web filesystem api, web filesystem access api, node, tauri); synchronous file systems return signals on read access, whereas asynchronous file systems are supposed to return resources. Unfortunately, I get an error on node with asynchronous file systems; sharedContext is not defined. Is that correct?
5 Replies
lxsmnsyc
lxsmnsyc2y ago
what does your code look like also ideally this primitive should only work if you pull the browser build
Alex Lohr
Alex LohrOP2y ago
Why should it only work in the browser? it's supposed to be isomorphic, like all of our solid-primitives.
Alex Lohr
Alex LohrOP2y ago
GitHub
solid-primitives/index.ts at filesystem · solidjs-community/solid-p...
A library of high-quality primitives that extend SolidJS reactivity. - solid-primitives/index.ts at filesystem · solidjs-community/solid-primitives
lxsmnsyc
lxsmnsyc2y ago
No, I don't mean browser as-in THE browser, what I mean is the build that includes the reactivity runtime.
Alex Lohr
Alex LohrOP2y ago
Ah, of course. That's the issue, thanks. So I need to directly import it from solid-js/dist/solid.js
Want results from more Discord servers?
Add your server