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

does not contain a default export #106

Open
DenisCarriere opened this issue May 26, 2023 · 1 comment
Open

does not contain a default export #106

DenisCarriere opened this issue May 26, 2023 · 1 comment
Assignees
Milestone

Comments

@DenisCarriere
Copy link

platform: NextJS 13

⚠️ warning message

Attempted import error: '@wharfkit/web-renderer' does not contain a default export (imported as 'WebRenderer').

Strangely.. the code still runs and compiles 🤷‍♂️

Code

import WebRenderer from '@wharfkit/web-renderer';

Similar code to previous: #15

@aaroncox
Copy link
Member

I'm honestly not sure why exactly this is happening. I tried a ton of permutations on the build process between named/default exports, and both while valid, still produce this result.

The comment I made here #107 (comment) about dynamically including the imports within the useEffect call does seem to eliminate the error... which is why I think the reason it's working is that the named/default exports are indeed working on the client-side when the code is being used - but in the SSR while nextjs is running, it's somehow mangling them and not importing properly. This one we may have to chalk up to NextJS doing something odd during SSR...

@aaroncox aaroncox added this to the 0.5.x milestone May 26, 2023
@aaroncox aaroncox self-assigned this May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Icebox
Development

No branches or pull requests

2 participants