Closed raychunghk closed 1 year ago
No response
When I copied below example to test:
`function Demo() { const [value, setValue] = useState<Date | null>(null); return (
); }`
This line of code will cause the next.js page error. const [value, setValue] = useState<Date | null>(null);
I have to get rid of this by change it as below:
`
function Demo() { const [value, setValue] = useState(new Date()); return (
FYI, my packages are as below: ├── @babel/core@7.21.8 ├── @emotion/react@11.11.0 ├── @emotion/server@11.11.0 ├── @mantine/carousel@6.0.11 ├── @mantine/core@6.0.11 ├── @mantine/dates@6.0.11 ├── @mantine/dropzone@6.0.11 ├── @mantine/ds@6.0.11 ├── @mantine/form@6.0.11 ├── @mantine/hooks@6.0.11 ├── @mantine/modals@6.0.11 ├── @mantine/next@6.0.11 ├── @mantine/notifications@6.0.11 ├── @mantine/nprogress@6.0.11 ├── @mantine/prism@6.0.11 ├── @mantine/spotlight@6.0.11 ├── @mantine/tiptap@6.0.11 ├── @nestjs/cli@9.5.0 ├── @nestjs/common@9.4.1 ├── @nestjs/core@9.4.1 ├── @nestjs/platform-express@9.4.1 ├── @nestjs/platform-fastify@9.4.2 ├── @nestjs/schematics@9.2.0 ├── @nestjs/testing@9.4.1 ├── @next/bundle-analyzer@13.4.4 ├── @next/eslint-plugin-next@13.4.4 ├── @nextui-org/react@1.0.0-beta.13 ├── @prisma/client@4.14.1 ├── @storybook/react@7.0.18 ├── @tabler/icons-react@2.20.0 ├── @tabler/icons@1.119.0 ├── @testing-library/dom@9.3.0 ├── @testing-library/jest-dom@5.16.5 ├── @testing-library/react@14.0.0 ├── @testing-library/user-event@14.4.3 ├── @tiptap/extension-link@2.0.3 ├── @tiptap/react@2.0.3 ├── @tiptap/starter-kit@2.0.3 ├── @types/express@4.17.17 ├── @types/jest@29.5.1 ├── @types/node@18.16.12 ├── @types/react@18.2.7 ├── @types/supertest@2.0.12 ├── @typescript-eslint/eslint-plugin@5.59.7 ├── @typescript-eslint/parser@5.59.7 ├── autoprefixer@10.4.14 ├── axios@1.4.0 ├── babel-loader@8.3.0 ├── body-parser@1.20.2 ├── clsx@1.2.1 ├── cookie-parser@1.4.6 ├── cookies-next@2.1.1 ├── cross-env@7.0.3 ├── date-fns@2.30.0 ├── dayjs@1.11.7 ├── dotenv@16.0.3 ├── embla-carousel-react@7.1.0 ├── eslint-config-airbnb-typescript@17.0.0 ├── eslint-config-airbnb@19.0.4 ├── eslint-config-mantine@2.0.0 ├── eslint-config-prettier@8.8.0 ├── eslint-plugin-import@2.27.5 ├── eslint-plugin-jest@26.9.0 ├── eslint-plugin-jsx-a11y@6.7.1 ├── eslint-plugin-prettier@4.2.1 ├── eslint-plugin-react-hooks@4.6.0 ├── eslint-plugin-react@7.32.2 ├── eslint-plugin-storybook@0.5.13 ├── eslint-plugin-testing-library@5.11.0 ├── eslint@8.41.0 ├── exceljs@4.3.0 ├── express@4.18.2 ├── fetch@1.1.0 ├── fs@0.0.1-security ├── gray-matter@4.0.3 ├── ical2json@3.1.2 ├── ics-to-json-extended@1.1.4 ├── ics-to-json@1.0.0 ├── jest@29.5.0 ├── md5@2.3.0 ├── multer@1.4.5-lts.1 ├── nest-next@10.1.0 ├── next@13.4.0 ├── nodemon@2.0.22 ├── postcss@8.4.24 ├── prettier@2.8.8 ├── prisma@4.14.1 ├── react-dom@18.2.0 ├── react-hook-form@7.44.2 ├── react@18.2.0 ├── reflect-metadata@0.1.13 ├── remark-html@15.0.2 ├── remark@14.0.3 ├── rxjs@7.8.1 ├── sass@1.62.1 ├── source-map-support@0.5.21 ├── sqlite3@5.1.6 ├── storybook-addon-turbo-build@2.0.1 ├── storybook-dark-mode@3.0.0 ├── supertest@6.3.3 ├── swr@2.1.5 ├── tailwindcss@3.3.2 ├── ts-jest@29.1.0 ├── ts-loader@9.4.2 ├── ts-node@10.9.1 ├── tsconfig-paths@4.2.0 ├── typescript@5.0.4 ├── winston@3.9.0 └── xlsx@0.18.5
None
Please send a sandbox that reproduces the issue, template – https://codesandbox.io/s/mantine-template-9ze89?file=/src/App.tsx:0-6
Link to the page where something nasty is located
No response
Exact quote of what is wrong
When I copied below example to test:
`function Demo() { const [value, setValue] = useState<Date | null>(null); return (
); }`
This line of code will cause the next.js page error. const [value, setValue] = useState<Date | null>(null);
I have to get rid of this by change it as below:
`
function Demo() { const [value, setValue] = useState(new Date()); return (
); }`
FYI, my packages are as below: ├── @babel/core@7.21.8 ├── @emotion/react@11.11.0 ├── @emotion/server@11.11.0 ├── @mantine/carousel@6.0.11 ├── @mantine/core@6.0.11 ├── @mantine/dates@6.0.11 ├── @mantine/dropzone@6.0.11 ├── @mantine/ds@6.0.11 ├── @mantine/form@6.0.11 ├── @mantine/hooks@6.0.11 ├── @mantine/modals@6.0.11 ├── @mantine/next@6.0.11 ├── @mantine/notifications@6.0.11 ├── @mantine/nprogress@6.0.11 ├── @mantine/prism@6.0.11 ├── @mantine/spotlight@6.0.11 ├── @mantine/tiptap@6.0.11 ├── @nestjs/cli@9.5.0 ├── @nestjs/common@9.4.1 ├── @nestjs/core@9.4.1 ├── @nestjs/platform-express@9.4.1 ├── @nestjs/platform-fastify@9.4.2 ├── @nestjs/schematics@9.2.0 ├── @nestjs/testing@9.4.1 ├── @next/bundle-analyzer@13.4.4 ├── @next/eslint-plugin-next@13.4.4 ├── @nextui-org/react@1.0.0-beta.13 ├── @prisma/client@4.14.1 ├── @storybook/react@7.0.18 ├── @tabler/icons-react@2.20.0 ├── @tabler/icons@1.119.0 ├── @testing-library/dom@9.3.0 ├── @testing-library/jest-dom@5.16.5 ├── @testing-library/react@14.0.0 ├── @testing-library/user-event@14.4.3 ├── @tiptap/extension-link@2.0.3 ├── @tiptap/react@2.0.3 ├── @tiptap/starter-kit@2.0.3 ├── @types/express@4.17.17 ├── @types/jest@29.5.1 ├── @types/node@18.16.12 ├── @types/react@18.2.7 ├── @types/supertest@2.0.12 ├── @typescript-eslint/eslint-plugin@5.59.7 ├── @typescript-eslint/parser@5.59.7 ├── autoprefixer@10.4.14 ├── axios@1.4.0 ├── babel-loader@8.3.0 ├── body-parser@1.20.2 ├── clsx@1.2.1 ├── cookie-parser@1.4.6 ├── cookies-next@2.1.1 ├── cross-env@7.0.3 ├── date-fns@2.30.0 ├── dayjs@1.11.7 ├── dotenv@16.0.3 ├── embla-carousel-react@7.1.0 ├── eslint-config-airbnb-typescript@17.0.0 ├── eslint-config-airbnb@19.0.4 ├── eslint-config-mantine@2.0.0 ├── eslint-config-prettier@8.8.0 ├── eslint-plugin-import@2.27.5 ├── eslint-plugin-jest@26.9.0 ├── eslint-plugin-jsx-a11y@6.7.1 ├── eslint-plugin-prettier@4.2.1 ├── eslint-plugin-react-hooks@4.6.0 ├── eslint-plugin-react@7.32.2 ├── eslint-plugin-storybook@0.5.13 ├── eslint-plugin-testing-library@5.11.0 ├── eslint@8.41.0 ├── exceljs@4.3.0 ├── express@4.18.2 ├── fetch@1.1.0 ├── fs@0.0.1-security ├── gray-matter@4.0.3 ├── ical2json@3.1.2 ├── ics-to-json-extended@1.1.4 ├── ics-to-json@1.0.0 ├── jest@29.5.0 ├── md5@2.3.0 ├── multer@1.4.5-lts.1 ├── nest-next@10.1.0 ├── next@13.4.0 ├── nodemon@2.0.22 ├── postcss@8.4.24 ├── prettier@2.8.8 ├── prisma@4.14.1 ├── react-dom@18.2.0 ├── react-hook-form@7.44.2 ├── react@18.2.0 ├── reflect-metadata@0.1.13 ├── remark-html@15.0.2 ├── remark@14.0.3 ├── rxjs@7.8.1 ├── sass@1.62.1 ├── source-map-support@0.5.21 ├── sqlite3@5.1.6 ├── storybook-addon-turbo-build@2.0.1 ├── storybook-dark-mode@3.0.0 ├── supertest@6.3.3 ├── swr@2.1.5 ├── tailwindcss@3.3.2 ├── ts-jest@29.1.0 ├── ts-loader@9.4.2 ├── ts-node@10.9.1 ├── tsconfig-paths@4.2.0 ├── typescript@5.0.4 ├── winston@3.9.0 └── xlsx@0.18.5
Are you willing to create pull request with the fix?
None