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

Conflict with Global CSS import from @cord-sdk/react and Next.js Build Error #3

Open
anader123 opened this issue May 23, 2024 · 0 comments

Comments

@anader123
Copy link

When building a Next.js project, the @cord-sdk/react package causes a build error due to a global CSS import issue. Next.js restricts importing CSS globally from within node_modules.

Error
error ./node_modules/@cord-sdk/react/dist/mjs/components/helpers/Icon.css.ts.vanilla.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/@cord-sdk/react/dist/mjs/index.js

Import Trace
./node_modules/@cord-sdk/react/dist/mjs/components/helpers/Icon.css.ts.vanilla.css
./node_modules/@cord-sdk/react/dist/mjs/index.js

Behavior
The build fails due to a CSS import restriction in Next.js, as global styles should not be imported from node_modules.

Next.js Version: 13.4.12
@cord-sdk/react Version: Latest version
Ts Node Version: ^10.9.1

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