Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NextJS v13.0 issues #244

Closed
BWBama85 opened this issue Oct 27, 2022 · 2 comments
Closed

NextJS v13.0 issues #244

BWBama85 opened this issue Oct 27, 2022 · 2 comments

Comments

@BWBama85
Copy link

error - TypeError: React__default.default.createContext is not a function
    at eval (webpack-internal:///(sc_server)/./node_modules/react-daisyui/dist/react-daisyui.cjs:5586:60)
    at Object.(sc_server)/./node_modules/react-daisyui/dist/react-daisyui.cjs (C:\Users\bamas\OneDrive\Documents\My Backups\Development\nodejs\thewilsonnet.com\.next\server\app\page.js:1087:1)
    at __webpack_require__ (C:\Users\bamas\OneDrive\Documents\My Backups\Development\nodejs\thewilsonnet.com\.next\server\webpack-runtime.js:33:42)
    at eval (webpack-internal:///(sc_server)/./app/layout.tsx:7:71)
    at Object.(sc_server)/./app/layout.tsx (C:\Users\bamas\OneDrive\Documents\My Backups\Development\nodejs\thewilsonnet.com\.next\server\app\page.js:230:1)       
    at __webpack_require__ (C:\Users\bamas\OneDrive\Documents\My Backups\Development\nodejs\thewilsonnet.com\.next\server\webpack-runtime.js:33:42)
    at Object.layout (webpack-internal:///(sc_server)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=C%3A%5CUsers%5Cbamas%5COneDrive%5CDocuments%5CMy%20Backups%5CDevelopment%5Cnodejs%5Cthewilsonnet.com%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=C%3A%5CUsers%5Cbamas%5COneDrive%5CDocuments%5CMy%20Backups%5CDevelopment%5Cnodejs%5Cthewilsonnet.com&isDev=true&tsconfigPath=tsconfig.json!:22:153)
    at Object.collectGenerateParams (C:\Users\bamas\OneDrive\Documents\My Backups\Development\nodejs\thewilsonnet.com\node_modules\next\dist\build\utils.js:710:110)
    at Object.loadStaticPaths (C:\Users\bamas\OneDrive\Documents\My Backups\Development\nodejs\thewilsonnet.com\node_modules\next\dist\server\dev\static-paths-worker.js:43:50)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  type: 'TypeError',
  page: '/'
}

next.config.js:

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    appDir: true,
    transpilePackages: ["react-daisyui"],
  },
};

module.exports = nextConfig;
@BWBama85
Copy link
Author

Resolved here for those who run into this with NextJS 13: vercel/next.js#41929 (comment)

@benjitrosch
Copy link
Collaborator

benjitrosch commented Oct 27, 2022

Hey @BWBama85,

Thanks for looking into this and finding a fix with Client Components!

I'll look into merging a permanent solution. Since only the Theme component uses Context, maybe we can refactor, or mark it as use client and recommend a new way to add nesting theming without the useTheme hook.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants