jusy run yarn add -g nextui-cli and nextui init my-nextui-app then open this dir with VScode ,run yarn install in Terminal , next setp to run yarn build. this error is print in my Terminal .
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Issue Title: Build Error After Running NextUI Setup
Description:
I ran the following commands to set up my NextUI project:
yarn global add nextui-cli
nextui init my-nextui-app
Opened the directory with VSCode.
Ran yarn install in the terminal.
Attempted to run yarn build, but encountered an error.
Steps to Reproduce:
Run yarn global add nextui-cli
Run nextui init my-nextui-app
Open the project directory in VSCode.
Run yarn install
Run yarn build
Error Message:
./components/theme-switch.tsx:42:6
Type error: 'Component' cannot be used as a JSX component.
Its element type 'Element | Component<any, any, any> | null' is not a valid JSX element.
Type 'Component<any, any, any>' is not assignable to type 'Element | ElementClass | null'.
Type 'Component<any, any, any>' is not assignable to type 'ElementClass'.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type 'import("C:/Users/maqingbo/Desktop/my-nextui-app/node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index").ReactNode'.
Type 'bigint' is not assignable to type 'ReactNode'.
40 |
41 | return (
> 42 | <Component
| ^
43 | {...getBaseProps({
44 | className: clsx(
45 | "px-px transition-opacity hover:opacity-80 cursor-pointer",
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
NextUI Version
2.4.8
Describe the bug
jusy run
yarn add -g nextui-cli
andnextui init my-nextui-app
then open this dir with VScode ,runyarn install
in Terminal , next setp to runyarn build
. this error is print in my Terminal .Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Issue Title: Build Error After Running NextUI Setup
Description:
I ran the following commands to set up my NextUI project:
yarn global add nextui-cli
nextui init my-nextui-app
yarn install
in the terminal.yarn build
, but encountered an error.Steps to Reproduce:
yarn global add nextui-cli
nextui init my-nextui-app
yarn install
yarn build
Error Message:
Environment:
Expected behavior
not error
Screenshots or Videos
No response
Operating System Version
Windows
Browser
Chrome