Next.js Discord

Discord Forum

Hey, i seem to have an error in nextjs 14 but can't seem to figure out what it is (Solved)

Answered
Californian posted this in #help-forum
Open in Discord
CalifornianOP
The Error dosen't affect builds just building locally it always has this included
rt.toLowerCase is not a function

and always seems to have something with webpack related i have attached a screen shot with this times error.
Answered by Ray
try downgrading next to 14.1.4
View full answer

12 Replies

CalifornianOP
here it is in another repository
it also has another error but i don't believe they are related it's probaly just me needing to fix something
this is one the second one's repo
https://github.com/Morten010/Kicks-Webshop
Answer
CalifornianOP
and this is the first ones pacakage.json
{
  "name": "newportfolio",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "contentlayer build && next build",
    "deploy": "npm run build && npm run start",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@types/node": "20.3.2",
    "@types/react": "18.2.14",
    "@types/react-dom": "18.2.6",
    "@vercel/analytics": "^1.2.2",
    "as-nav-link": "^0.1.5",
    "autoprefixer": "10.4.14",
    "clsx": "^2.1.0",
    "contentlayer": "^0.3.4",
    "emoji-flags": "^1.3.0",
    "eslint-config-next": "^14.2.1",
    "framer-motion": "^11.0.3",
    "next": "^14.2.1",
    "next-contentlayer": "^0.3.4",
    "next-intl": "^3.9.1",
    "next-mdx-remote": "^4.4.1",
    "postcss": "8.4.24",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-icons": "^4.10.1",
    "rehype-autolink-headings": "^7.0.0",
    "rehype-pretty-code": "^0.10.1",
    "rehype-slug": "^6.0.0",
    "remark-gfm": "^3.0.1",
    "sharp": "^0.33.2",
    "shiki": "^0.14.4",
    "tailwind-merge": "^1.14.0",
    "tailwindcss": "3.3.2",
    "typescript": "5.1.6"
  },
  "overrides": {
    "next-contentlayer": {
      "next": "$next"
    }
  }
}
@Ray try downgrading next to 14.1.4
CalifornianOP
thanks will try
@Ray try downgrading next to 14.1.4
CalifornianOP
Thanks it worked
@Californian Thanks it worked
yeah that error start showing with 14.2, wait the next version
@Ray yeah that error start showing with 14.2, wait the next version
CalifornianOP
Do you know why the error dont show on builds on vercel?
@Californian Do you know why the error dont show on builds on vercel?
should be related to vscode plugin. try building in terminal without vscode open
@Ray should be related to vscode plugin. try building in terminal without vscode open
CalifornianOP
Damn do you know which ones?
@Californian Damn do you know which ones?
Im not sure
some people said that it only happen on vscode