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 load in deno #29

Open
kyeotic opened this issue May 1, 2023 · 5 comments
Open

Unable to load in deno #29

kyeotic opened this issue May 1, 2023 · 5 comments

Comments

@kyeotic
Copy link

kyeotic commented May 1, 2023

When I try loading in deno with import { XMasonry, XBlock } from 'react-xmasonry' I get

Uncaught SyntaxError: The requested module 'react-xmasonry' does not provide an export named 'XBlock' at file:///home/kyeotic/dev/portfolio/src/app/projects/Projects.tsx:2:20

This happens with all of these options (defined in import_map)

@nikitaeverywhere
Copy link
Owner

Hello! Sure, because react-xmasonry is meant to be used in the browser, within React framework.

What's the use case of using it in deno?

@nikitaeverywhere
Copy link
Owner

Also: see what's exported.

@kyeotic
Copy link
Author

kyeotic commented May 2, 2023

The use case is Server side rendering in remix. Even an empty initial pass would be fine, but it fails to load.

@nikitaeverywhere
Copy link
Owner

Also: see what's exported.

react-xmasonry exports UMD module. I'm not a deno person (yet) so if you or anyone else have an idea why typical UMD is not imported into deno, I'd be happy to assist.

@kyeotic
Copy link
Author

kyeotic commented May 2, 2023

I'm still learning it myself. Usually UMD's, especially loaded through ESM transpilers like https://esm.sh, just work. I'm not sure why this one isn't working 🤷

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