next.js icon indicating copy to clipboard operation
next.js copied to clipboard

[v15] Module parse failed: Bad character escape sequence

Open faisalrehmanlums opened this issue 4 months ago • 22 comments

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/condescending-haze-go8s7s

To Reproduce

  1. run this commad: npx create-next-app@latest
  2. This will install latest version of nextjs like in package.json is "dependencies": { "react": "19.0.0-rc-65a56d0e-20241020", "react-dom": "19.0.0-rc-65a56d0e-20241020", "next": "15.0.0" }, "devDependencies": { "typescript": "^5", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "postcss": "^8", "tailwindcss": "^3.4.1", "eslint": "^8", "eslint-config-next": "15.0.0" }
  3. npm run dev
  4. browser showing error `Module parse failed: Bad character escape sequence (11:57) | const fileSizeInMB = buffer.byteLength / 1024 / 1024

error `

Current vs. Expected behavior

I have just not changed any default value during app creation like shown in screenshot it should spin up dev server without error. which it dose but after within seconds error pop out. install

Provide environment information

test

Which area(s) are affected? (Select all that apply)

create-next-app

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

When i step down to version 14 its working fine with 14.2.15 npx create-next-app@14 test-project

faisalrehmanlums avatar Oct 21 '24 21:10 faisalrehmanlums