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

Next.js compatibility #60

Open
pakatagoh opened this issue Feb 25, 2021 · 3 comments
Open

Next.js compatibility #60

pakatagoh opened this issue Feb 25, 2021 · 3 comments

Comments

@pakatagoh
Copy link

Hi nteract team,

I'm currently trying to make use of @nteract/jupyter-widgets in a project of mine with Next.js but I'm running into the issue below. I'm wondering if anyone has encountered such an issue and managed to solve it.

Screenshot 2021-02-25 at 17 26 24

@captainsafia
Copy link
Member

Thanks for opening this issue, @pakatagoh!

Unfortunately, we don't own the @jupyter-widgets/base component that is being imported by the jupyter-widgets package. What version of next.js are you using? vercel/next.js#12079 (comment) seems to indicate this was fixed in the 9.5.4 release.

@pakatagoh
Copy link
Author

pakatagoh commented Mar 9, 2021

currently on V10 of next.js. the setup I have is a lerna managed monorepo where the nextjs project is one of the packages. Not 100% sure if it affects anything.

@captainsafia
Copy link
Member

We use a similar setup in the nteract monorepo. However, we don't have ipywidget support included as part of the default app.

I misspoke earlier, the code in question is actually in our codebase.

import "@jupyter-widgets/base/css/index.css";
import "@jupyter-widgets/controls/css/labvariables.css";
import "@jupyter-widgets/controls/css/materialcolors.css";
import "@jupyter-widgets/controls/css/phosphor.css";
import "@jupyter-widgets/controls/css/widgets-base.css";
import "@jupyter-widgets/controls/css/widgets.css";

Would you be interested in trying to update this to use a require instead of an import to see if that resolves the issue?

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