t3 tutorial- chirp project...vercel build fails.
Following along with Theo's 2+hr video....got to the very first deployment to vercel. Project imports fine. Prisma db connection went fine. npm run build works fine locally...but...
Other than the database config from the tutorial, I've changed nothing in the app. Is there another config issue somewhere in Vercel? (Yes I added the env variable)
When vercel does a build to deploy:
info - Creating an optimized production build...
info - Compiled successfully
info - Collecting page data...
info - Generating static pages (0/6)
TypeError: Cannot read properties of null (reading 'useMemo')
at exports.useMemo (/vercel/path0/node_modules/react/cjs/react.production.min.js:25:208)
at Object.useDehydratedState (file:///vercel/path0/node_modules/@trpc/react-query/dist/createHooksInternal-ac3d45d9.mjs:517:29)
at WithTRPC (/vercel/path0/.next/server/chunks/34.js:101:38)
at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:114:273)
at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9)
at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
at He (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:123:155)
at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:122:100)
at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:222)
Other than the database config from the tutorial, I've changed nothing in the app. Is there another config issue somewhere in Vercel? (Yes I added the env variable)
When vercel does a build to deploy:
info - Creating an optimized production build...
info - Compiled successfully
info - Collecting page data...
info - Generating static pages (0/6)
TypeError: Cannot read properties of null (reading 'useMemo')
at exports.useMemo (/vercel/path0/node_modules/react/cjs/react.production.min.js:25:208)
at Object.useDehydratedState (file:///vercel/path0/node_modules/@trpc/react-query/dist/createHooksInternal-ac3d45d9.mjs:517:29)
at WithTRPC (/vercel/path0/.next/server/chunks/34.js:101:38)
at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:114:273)
at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
at Ge (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:115:9)
at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:91)
at He (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:123:155)
at Je (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:122:100)
at Z (/vercel/path0/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.browser.production.min.js:120:222)
Solution
GitHub
Verify canary release I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Versi...