Skip to content

Global CSS cannot be imported from within node_modules. #35

Open

Description

@Ibnathism

I am trying to use react-mathlive in a next.js project but facing this issue

./node_modules/mathlive/dist/mathlive-fonts.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-mathlive/dist/MathfieldComponent.js

I'm dropping nextjs documentation link here
https://nextjs.org/docs/messages/css-npm

Activity

  1. AdamZajler commented on Mar 7, 2023

    @AdamZajler

    Same problem here; anyone have a sollution for this?

  2. arnog commented on Mar 8, 2023

    @arnog

    This package is out of date and as far as I can tell no longer maintained. The good news is that using MathLive in React should be pretty straightforward since it is now a web component.

    Here's an example https://gist.github.com/gerryfletch/09d9995725027fcbf060d0149441c3a8

    It's actually probably more complicated than what you need since it tries to do some custom styling which is probably not needed, but that may be enough to get you started

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions