Skip to content

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

@anader123

Description

@anader123

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

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