# Next.js

**URL:** https://forum.codewithmosh.com/c/nextjs/26.md?page=1

[Latest](https://forum.codewithmosh.com/latest.md) · [Categories](https://forum.codewithmosh.com/categories.md)

**Page:** 2

---

## [NextJS + Simple MDE + React Forms Hook Server Error](https://forum.codewithmosh.com/t/nextjs-simple-mde-react-forms-hook-server-error/24526)

<div class="topic-metadata">

**Author:** [@AdventureBear](https://forum.codewithmosh.com/u/AdventureBear)\
**Replies:** 5\
**Last updated:** [July 21, 2024, 6:36am UTC](https://forum.codewithmosh.com/t/nextjs-simple-mde-react-forms-hook-server-error/24526 "2024-07-21T06:36:27Z")

</div>

My form works, and stores to the database, but I get this server error when trying to use both the Smple MDE with the React Forms Hook Controller, but not when I use either one alone. The error: node\_modules/codemirro…

---

## [Programmatic Navigation Not Working](https://forum.codewithmosh.com/t/programmatic-navigation-not-working/27366)

<div class="topic-metadata">

**Author:** [@stevesarb](https://forum.codewithmosh.com/u/stevesarb)\
**Replies:** 1\
**Last updated:** [June 28, 2024, 5:25am UTC](https://forum.codewithmosh.com/t/programmatic-navigation-not-working/27366 "2024-06-28T05:25:31Z")

</div>

Hello. I have followed Mosh’s tutorial exactly (as far as I can tell), but for some reason, in the routing and navigation section of the tutorial, more specifically in the programmatic navigation video, my version that I…

---

## [Npx prisma migrate dev - failing](https://forum.codewithmosh.com/t/npx-prisma-migrate-dev-failing/23272)

<div class="topic-metadata">

**Author:** [@ManuKapoor](https://forum.codewithmosh.com/u/ManuKapoor)\
**Replies:** 6\
**Last updated:** [June 26, 2024, 2:01pm UTC](https://forum.codewithmosh.com/t/npx-prisma-migrate-dev-failing/23272 "2024-06-26T14:01:15Z")

</div>

Hi Forum, I’m frustrated with the error below on running the command: npx prisma migrate dev Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": MySQL database "nextap…

---

## [NextAuth error on production](https://forum.codewithmosh.com/t/nextauth-error-on-production/24616)

<div class="topic-metadata">

**Author:** [@petervel](https://forum.codewithmosh.com/u/petervel)\
**Replies:** 2\
**Last updated:** [June 8, 2024, 8:40am UTC](https://forum.codewithmosh.com/t/nextauth-error-on-production/24616 "2024-06-08T08:40:36Z")

</div>

I’ve completed the NextJS course, and my authentication works fine locally, but when I try to login on my Vercel environment I get errors. I’ve created a new client for production on google: I’ve added the GOOGLE\_CLIE…

---

## [NextJS PlanetScale Alternative](https://forum.codewithmosh.com/t/nextjs-planetscale-alternative/25669)

<div class="topic-metadata">

**Author:** [@Sandwizard](https://forum.codewithmosh.com/u/Sandwizard)\
**Replies:** 4\
**Last updated:** [May 29, 2024, 1:57pm UTC](https://forum.codewithmosh.com/t/nextjs-planetscale-alternative/25669 "2024-05-29T13:57:12Z")

</div>

Since PlanetScale removed their free tier, I was hoping to alternatives to their service. I tried quite a few but they’re all producing errors during deployment that I cannot fix or find solutions to. Anyone else current…

---

## [Failed Deployment to Vercel](https://forum.codewithmosh.com/t/failed-deployment-to-vercel/26863)

<div class="topic-metadata">

**Author:** [@emperial](https://forum.codewithmosh.com/u/emperial)\
**Replies:** 0\
**Last updated:** [May 22, 2024, 11:26pm UTC](https://forum.codewithmosh.com/t/failed-deployment-to-vercel/26863 "2024-05-22T23:26:27Z")

</div>

Hello Team I’m trying to deploy my NextJS project on Vercel however it gets failed due to below error: My code in page.tsx in relation to error is as below: "use client"; import { BookStatusBadge } from "@/app/comp…

---

## [A \<Select.Item /\> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder](https://forum.codewithmosh.com/t/a-select-item-must-have-a-value-prop-that-is-not-an-empty-string-this-is-because-the-select-value-can-be-set-to-an-empty-string-to-clear-the-selection-and-show-the-placeholder/23078)

<div class="topic-metadata">

**Author:** [@noanfsadk](https://forum.codewithmosh.com/u/noanfsadk)\
**Replies:** 10\
**Last updated:** [May 16, 2024, 3:30pm UTC](https://forum.codewithmosh.com/t/a-select-item-must-have-a-value-prop-that-is-not-an-empty-string-this-is-because-the-select-value-can-be-set-to-an-empty-string-to-clear-the-selection-and-show-the-placeholder/23078 "2024-05-16T15:30:45Z")

</div>

Hello there! I have encountered the following issue: :sob: @Mosh \<Select defaultValue={issue.assignedToUserId || ""} onValueChange={assignIssue} \> \<SelectTrigger\> \<SelectValue placeholder="Una…

---

## [Deploying a Next.js application to AlwaysData](https://forum.codewithmosh.com/t/deploying-a-next-js-application-to-alwaysdata/26656)

<div class="topic-metadata">

**Author:** [@mounir](https://forum.codewithmosh.com/u/mounir)\
**Replies:** 0\
**Last updated:** [May 14, 2024, 12:26am UTC](https://forum.codewithmosh.com/t/deploying-a-next-js-application-to-alwaysdata/26656 "2024-05-14T00:26:05Z")

</div>

Hello everyone, I am currently having trouble deploying my Next.js application to an AlwaysData server for the protein.tn website. I have followed the instructions provided by AlwaysData, but I am still encountering an …

---

## [\[Additional excercises @Mosh \] Are there anywhere we can check solutions for additional excercises?](https://forum.codewithmosh.com/t/additional-excercises-mosh-are-there-anywhere-we-can-check-solutions-for-additional-excercises/23477)

<div class="topic-metadata">

**Author:** [@Felix\_Lu](https://forum.codewithmosh.com/u/Felix_Lu)\
**Replies:** 4\
**Last updated:** [May 12, 2024, 11:25pm UTC](https://forum.codewithmosh.com/t/additional-excercises-mosh-are-there-anywhere-we-can-check-solutions-for-additional-excercises/23477 "2024-05-12T23:25:38Z")

</div>

Hi guys, I’ve implemented desc sort, which is a client event click the table header to toggle the sort order, however in the meanwhile, I make the Prisma client take the sort order from the query params and pass it into…

---

## [Error with placeholder prop in IssueStatusFilter](https://forum.codewithmosh.com/t/error-with-placeholder-prop-in-issuestatusfilter/26119)

<div class="topic-metadata">

**Author:** [@Adrian3P](https://forum.codewithmosh.com/u/Adrian3P)\
**Replies:** 6\
**Last updated:** [May 3, 2024, 1:15pm UTC](https://forum.codewithmosh.com/t/error-with-placeholder-prop-in-issuestatusfilter/26119 "2024-05-03T13:15:21Z")

</div>

Hi, I encountered this error for the placeholder prop even though I checked the documentation and the placeholder can still be used as a prop for Select - radix UI I have the right version in package.json - “@radix-ui/…

---

## [CSS not being applied](https://forum.codewithmosh.com/t/css-not-being-applied/26381)

<div class="topic-metadata">

**Author:** [@jbenson001](https://forum.codewithmosh.com/u/jbenson001)\
**Replies:** 0\
**Last updated:** [May 2, 2024, 10:22pm UTC](https://forum.codewithmosh.com/t/css-not-being-applied/26381 "2024-05-02T22:22:20Z")

</div>

Hello all I am working in the Issue Tracker NextJS course and I am having an issue with CSS. I had an issue with the “placeholder” prop not being recognized by RadixUI Select object. I found a post in here that helped…

---

## [Planetscale is removing free tier](https://forum.codewithmosh.com/t/planetscale-is-removing-free-tier/25534)

<div class="topic-metadata">

**Author:** [@Exolite](https://forum.codewithmosh.com/u/Exolite)\
**Replies:** 5\
**Last updated:** [May 1, 2024, 10:23pm UTC](https://forum.codewithmosh.com/t/planetscale-is-removing-free-tier/25534 "2024-05-01T22:23:34Z")

</div>

For those of you who havn’t seen the mail, Planetscale is removing the free hobby tier on April 8th, after that you’ll have to pay ~40$/month. I suggest you find an alternative and migrate quickly. Please notice, Plane…

---

## [Any success in setting up a Prod DB somewhere other than Planet Scale?](https://forum.codewithmosh.com/t/any-success-in-setting-up-a-prod-db-somewhere-other-than-planet-scale/26362)

<div class="topic-metadata">

**Author:** [@KeturahDev](https://forum.codewithmosh.com/u/KeturahDev)\
**Replies:** 0\
**Last updated:** [May 1, 2024, 8:37pm UTC](https://forum.codewithmosh.com/t/any-success-in-setting-up-a-prod-db-somewhere-other-than-planet-scale/26362 "2024-05-01T20:37:50Z")

</div>

(I posted this as a response to a post warning that PlanetScale’s free tier is going away, but posting here for a higher chance of visibility) Has anyone succeeded in converting to any of these? I’ve tried, and failed. …

---

## [Why use useEffect() hook](https://forum.codewithmosh.com/t/why-use-useeffect-hook/26344)

<div class="topic-metadata">

**Author:** [@jbenson001](https://forum.codewithmosh.com/u/jbenson001)\
**Replies:** 2\
**Last updated:** [May 1, 2024, 1:40pm UTC](https://forum.codewithmosh.com/t/why-use-useeffect-hook/26344 "2024-05-01T13:40:08Z")

</div>

Hi all, I am following along in the NextJS course building the Issue Tracker. I am on the section called "Populate the Assignee dropdown. In the code he is using the useEffect() hook. He does not explain why, just sa…

---

## [Google Provider - not working -again!](https://forum.codewithmosh.com/t/google-provider-not-working-again/26333)

<div class="topic-metadata">

**Author:** [@jbenson001](https://forum.codewithmosh.com/u/jbenson001)\
**Replies:** 0\
**Last updated:** [April 29, 2024, 8:41pm UTC](https://forum.codewithmosh.com/t/google-provider-not-working-again/26333 "2024-04-29T20:41:30Z")

</div>

Hello all, I hope someone can help me with this issue as I had the same problem in the first part of the course. I am working on the NextJS course building the Issue Tracker system. I have followed Mosh’s directions t…

---

## [NEXT.JS getting Warning message For both for NEW issue page and EDIT issue page](https://forum.codewithmosh.com/t/next-js-getting-warning-message-for-both-for-new-issue-page-and-edit-issue-page/23035)

<div class="topic-metadata">

**Author:** [@Gnaneshnayak](https://forum.codewithmosh.com/u/Gnaneshnayak)\
**Replies:** 8\
**Last updated:** [April 29, 2024, 3:46pm UTC](https://forum.codewithmosh.com/t/next-js-getting-warning-message-for-both-for-new-issue-page-and-edit-issue-page/23035 "2024-04-29T15:46:18Z")

</div>

app-index.js:31 Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? Check the render method of Controller. 'use client'; import { ErrorMess…

---

## [Problem with Prisma Adpater - (findUnique)](https://forum.codewithmosh.com/t/problem-with-prisma-adpater-findunique/26313)

<div class="topic-metadata">

**Author:** [@CDL95](https://forum.codewithmosh.com/u/CDL95)\
**Replies:** 0\
**Last updated:** [April 28, 2024, 8:42am UTC](https://forum.codewithmosh.com/t/problem-with-prisma-adpater-findunique/26313 "2024-04-28T08:42:37Z")

</div>

Trying to sign in, the error keeps popping up, any solutions to resolve the matter?

---

## [Latest Issue image of assignee not showing](https://forum.codewithmosh.com/t/latest-issue-image-of-assignee-not-showing/26290)

<div class="topic-metadata">

**Author:** [@Manjaaay](https://forum.codewithmosh.com/u/Manjaaay)\
**Replies:** 1\
**Last updated:** [April 26, 2024, 9:32am UTC](https://forum.codewithmosh.com/t/latest-issue-image-of-assignee-not-showing/26290 "2024-04-26T09:32:37Z")

</div>

who else encounter this issue in production? but when you redeployed your application, that’s the time that the image will appear. have anyone encountered this ?

---

## [Error in patch assigned users](https://forum.codewithmosh.com/t/error-in-patch-assigned-users/26264)

<div class="topic-metadata">

**Author:** [@Manjaaay](https://forum.codewithmosh.com/u/Manjaaay)\
**Replies:** 1\
**Last updated:** [April 24, 2024, 5:57pm UTC](https://forum.codewithmosh.com/t/error-in-patch-assigned-users/26264 "2024-04-24T17:57:50Z")

</div>

whats wrong? trying to update the issue to assign the user. but thats why i get when trying to update. can someone help ?

---

## [Next JS Course problem with navbar](https://forum.codewithmosh.com/t/next-js-course-problem-with-navbar/26242)

<div class="topic-metadata">

**Author:** [@Manjaaay](https://forum.codewithmosh.com/u/Manjaaay)\
**Replies:** 2\
**Last updated:** [April 24, 2024, 3:59pm UTC](https://forum.codewithmosh.com/t/next-js-course-problem-with-navbar/26242 "2024-04-24T15:59:10Z")

</div>

1st picture. default viewing, now when i click my image, look at carefully the padding top of the navbar item (2nd picture), it went closer to the margin top. how you guys solve this problem or is it anyone encount…

---

## [Thank you Mosh from Rafa](https://forum.codewithmosh.com/t/thank-you-mosh-from-rafa/25885)

<div class="topic-metadata">

**Author:** [@Rapha-btc](https://forum.codewithmosh.com/u/Rapha-btc)\
**Replies:** 2\
**Last updated:** [April 20, 2024, 1:21am UTC](https://forum.codewithmosh.com/t/thank-you-mosh-from-rafa/25885 "2024-04-20T01:21:23Z")

</div>

I want to emphasize how much I love Code with Mosh. Thank you! I’m learning slowly but surely :slight\_smile:

---

## [Cannot import prisma](https://forum.codewithmosh.com/t/cannot-import-prisma/26155)

<div class="topic-metadata">

**Author:** [@lqfjun88](https://forum.codewithmosh.com/u/lqfjun88)\
**Replies:** 1\
**Last updated:** [April 18, 2024, 2:44am UTC](https://forum.codewithmosh.com/t/cannot-import-prisma/26155 "2024-04-18T02:44:48Z")

</div>

Hi, I was following the nextjs course. I follow the codes diligently but am stuck at part 7 of database integration with prisma. Is a simple line import { prisma } from “@prisma/client”; But vscode reported error that…

---

## [NextJS Part 2 Issue Tracker, Creating Issues -\> Client-side Validation: "Description is required" custom error message does not render during client side validation](https://forum.codewithmosh.com/t/nextjs-part-2-issue-tracker-creating-issues-client-side-validation-description-is-required-custom-error-message-does-not-render-during-client-side-validation/25870)

<div class="topic-metadata">

**Author:** [@George1](https://forum.codewithmosh.com/u/George1)\
**Replies:** 2\
**Last updated:** [April 18, 2024, 2:17am UTC](https://forum.codewithmosh.com/t/nextjs-part-2-issue-tracker-creating-issues-client-side-validation-description-is-required-custom-error-message-does-not-render-during-client-side-validation/25870 "2024-04-18T02:17:41Z")

</div>

Similar to what Mosh shows us at the 15sec mark in the video titled, “Implementing Client-side Validation” in “Creating Issues” section, I added a custom error msg for the title and description properties in createIssueS…

---

## [Replacing google client id and secret for production](https://forum.codewithmosh.com/t/replacing-google-client-id-and-secret-for-production/26131)

<div class="topic-metadata">

**Author:** [@KeturahDev](https://forum.codewithmosh.com/u/KeturahDev)\
**Replies:** 1\
**Last updated:** [April 15, 2024, 10:04pm UTC](https://forum.codewithmosh.com/t/replacing-google-client-id-and-secret-for-production/26131 "2024-04-15T22:04:38Z")

</div>

In the last video of this tutorial, we are supposed to replace the google client env variables but tells us to do it on our own. just looking into it quickly, it looked like we would need to create a completely new proj…

---

## [Who want to stay connected and learn together?](https://forum.codewithmosh.com/t/who-want-to-stay-connected-and-learn-together/25975)

<div class="topic-metadata">

**Author:** [@sabbadash](https://forum.codewithmosh.com/u/sabbadash)\
**Replies:** 0\
**Last updated:** [April 4, 2024, 6:24pm UTC](https://forum.codewithmosh.com/t/who-want-to-stay-connected-and-learn-together/25975 "2024-04-04T18:24:00Z")

</div>

Hi! My name is Nazarii, I am fresher at Edinburgh Napier University and recently started to learn Next.js & React & JavaScript. I have foundations of programming with langs like java and python, doing it for really long …

---

## [Next.js Course part-2 Issue Tracker : Assigned issue to users](https://forum.codewithmosh.com/t/next-js-course-part-2-issue-tracker-assigned-issue-to-users/23199)

<div class="topic-metadata">

**Author:** [@Prince](https://forum.codewithmosh.com/u/Prince)\
**Replies:** 8\
**Last updated:** [March 26, 2024, 10:16am UTC](https://forum.codewithmosh.com/t/next-js-course-part-2-issue-tracker-assigned-issue-to-users/23199 "2024-03-26T10:16:38Z")

</div>

Next.js Course part-2 Issue Tracker : Assigned issue to users. I restarted the server but this problem still occurs

---

## [Type error: Type 'OmitWithTag\<typeof import("C:/Users/bevan/OneDrive/Desktop/Projects/issue-tracker/app/api/issues/route"), "config" | "generateStaticParams" | "revalidate" | "dynamic" | "dynamicParams" | ... 10 more ... | "PATCH", ""\>' does not satisfy t](https://forum.codewithmosh.com/t/type-error-type-omitwithtag-typeof-import-c-users-bevan-onedrive-desktop-projects-issue-tracker-app-api-issues-route-config-generatestaticparams-revalidate-dynamic-dynamicparams-10-more-patch-does-not-satisfy-t/25821)

<div class="topic-metadata">

**Author:** [@bevanjacinto](https://forum.codewithmosh.com/u/bevanjacinto)\
**Replies:** 0\
**Last updated:** [March 26, 2024, 3:51am UTC](https://forum.codewithmosh.com/t/type-error-type-omitwithtag-typeof-import-c-users-bevan-onedrive-desktop-projects-issue-tracker-app-api-issues-route-config-generatestaticparams-revalidate-dynamic-dynamicparams-10-more-patch-does-not-satisfy-t/25821 "2024-03-26T03:51:24Z")

</div>

Im getting the following error when i try to run npm build after implementing the PATCH method Type error: Type ‘OmitWithTag\<typeof import(“C:/Users/bevan/OneDrive/Desktop/Projects/issue-tracker/app/api/issues/route”), …

---

## [Lost on data fetching in a server component](https://forum.codewithmosh.com/t/lost-on-data-fetching-in-a-server-component/24363)

<div class="topic-metadata">

**Author:** [@sawfiz1](https://forum.codewithmosh.com/u/sawfiz1)\
**Replies:** 2\
**Last updated:** [March 21, 2024, 11:45pm UTC](https://forum.codewithmosh.com/t/lost-on-data-fetching-in-a-server-component/24363 "2024-03-21T23:45:30Z")

</div>

Hi, all, Happy 2024! I am asking for help as I am lost on how to fetch data on the server side. Referring to the LastestIssue component, I know directly getting data using prisma works. But I do not like it because: …

---

## [\[challenge from the course\] Implementing the Issue status changing by improving the statusBadge component](https://forum.codewithmosh.com/t/challenge-from-the-course-implementing-the-issue-status-changing-by-improving-the-statusbadge-component/23269)

<div class="topic-metadata">

**Author:** [@Felix\_Lu](https://forum.codewithmosh.com/u/Felix_Lu)\
**Replies:** 4\
**Last updated:** [March 17, 2024, 7:53pm UTC](https://forum.codewithmosh.com/t/challenge-from-the-course-implementing-the-issue-status-changing-by-improving-the-statusbadge-component/23269 "2024-03-17T19:53:06Z")

</div>

Hi everyone, I am a rookie developer learning Nextjs from Mosh. It is such a great course that not only allows me to follow and practice but also encourages me to challenge myself continuously. So I challenged myself t…

---

## [\[ Issue with Avatar google img loading\] Referrer-policy Issue](https://forum.codewithmosh.com/t/issue-with-avatar-google-img-loading-referrer-policy-issue/23286)

<div class="topic-metadata">

**Author:** [@Felix\_Lu](https://forum.codewithmosh.com/u/Felix_Lu)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 7:36pm UTC](https://forum.codewithmosh.com/t/issue-with-avatar-google-img-loading-referrer-policy-issue/23286 "2024-03-17T19:36:46Z")

</div>

So the correct way to config the next.config.js for the referrer-policy is: Watch out the key /\*\* @type {import('next').NextConfig} \*/ const nextConfig = { async headers() { return \[ { source: "/:…

[Previous page](https://forum.codewithmosh.com/c/nextjs/26.md)

[Next page](https://forum.codewithmosh.com/c/nextjs/26.md?page=2)
