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

Error when using with next #141

Open
lamualfa opened this issue Mar 29, 2020 · 0 comments
Open

Error when using with next #141

lamualfa opened this issue Mar 29, 2020 · 0 comments

Comments

@lamualfa
Copy link

lamualfa commented Mar 29, 2020

Report a bug:

Basic information:

  • react-flag-icon-css version: ^1.0.25
  • Module bundler: I use next version: ^9.3.2
  • The output of node -v: v10.16.3

Description

I use next with Global Stylesheets

Error when compiled:

../node_modules/react-flag-icon-css/module/styles/main.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm
Location: ../node_modules/react-flag-icon-css/module/styles.js

How I am creating FlagIcon

import styles from './FlagIcon.module.scss';

import React from 'react';
import { CustomFlagIconFactory } from 'react-flag-icon-css';

const FlagIcon = CustomFlagIconFactory(React, {
  // I have also tried with the value `true`, but still can't
  useCssModules: false,
  themeStyles: styles
});

export default FlagIcon;
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

1 participant