sveltefire icon indicating copy to clipboard operation
sveltefire copied to clipboard

Cannot use <Node> component

Open likeablegeek opened this issue 1 year ago • 1 comments

I'm trying to use the Realtime Database using the <Node> component per the documentation here:

https://sveltefire.fireship.io/rtdb/node-component

But, when I import Node from sveltefire -- even before I try to use the actual component -- I get this error:

The requested module '/node_modules/.vite/deps/sveltefire.js?v=15231cb7' does not provide an export named 'Node'

My import looks like this:

import { SignedIn, Node } from 'sveltefire'

I can import and use other components such as SignedIn without issue -- but Node and NodeList throw this error. I have tried this in +layout.svelte in the root of my application as well as +page.svelte at the root or in other routes. It makes no difference.

I am making the assumption that Sveltefire is properly installed and working since i can use the user store, SignedIn, etc.

How can I approach debugging this?

likeablegeek avatar Jun 14 '24 12:06 likeablegeek

Hi @likeablegeek,

Thank you for pointing out the issue with importing the Node and NodeList components in the library.

I have created a PR to address this problem: #160. Once this PR is merged, you will be able to import and use the components without encountering any errors.

Thank you again for your vigilance and for helping us improve Sveltefire.

ItsAlexousd avatar Jul 17 '24 19:07 ItsAlexousd