Skip to content

'XXX' cannot be used as a JSX component. #20

@happyeric77

Description

@happyeric77

I am coming across an issue that the following error is thrown when I import @pontem/aptos-wallet-adapter

Situation

All the React Function Component gets the following error

'XXX' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>> | null' is not a valid JSX element

Reproduction

  1. Clone the repo
    git clone git@github.com:notifi-network/notifi-sdk-ts.git

  2. Install @pontem/aptos-wallet-adapter to @notifi-network/notifi-react-example package

cd notifi-sdk-ts
npm install
npx lerna --scope=@notifi-network/notifi-react-example run install  @pontem/aptos-wallet-adapter
  1. get into the packages/notifi-react-example/src/App.tsx and import @pontem/aptos-wallet-adapter
// ...
import  '@pontem/aptos-wallet-adapter'; 
// ...

The error below will be shown only by importing @pontem/aptos-wallet-adapter without doing anything

Screenshot 2023-10-25 at 15 57 18

All the JSX components become showing the same error 'XXX' cannot be used as a JSX component.

Could anybody give me a hint on how to get it around

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