While selecting App Router (yes) in Next.js 13 while installing through npx create-next-app@latest, does not work

1k views Asked by At

When i install next js in my project, next js ask for App Router (yes/no), when i select yes it install smoothly with out any error BUT when i run (npm run dev) command i got an error and my localhost:3000 doesn't show any thing on the screen. This problem is only show in my Windows laptop but in mac there is no such error. I update the node verson to the latest and still not working.

Screenshot of the ERROR

`- error node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-server.edge.development.js (235:12) @ resolveClientReferenceMetadata- error at stringify () null

  • error node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-server.edge.development.js (235:12) @ resolveClientReferenceMetadata- error at stringify () null
  • error node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-server.edge.development.js (235:12) @ resolveClientReferenceMetadata- error at stringify () null
  • error node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-server.edge.development.js (235:12) @ resolveClientReferenceMetadata- error at stringify () null
  • error node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-server.edge.development.js (235:12) @ resolveClientReferenceMetadata- error at stringify () null
  • error node_modules\next\dist\compiled\react-server-dom-webpack\cjs\react-server-dom-webpack-server.edge.development.js (235:12) @ resolveClientReferenceMetadata- error at stringify () digest: "3436126345" null`

Since Nextjs (App router) is a new feature in Nextjs 13 i haven't got any solution regarding this issue.

3

There are 3 answers

0
user1264392 On

I had the same problem. Try adding the --experimental-app flag:

npx create-next-app@latest --experimental-app 
0
Ayub Ali On

I had the same issue as well. I have tested this with my own computer. My machine is win 11 with node v20.2.0 and npm v9.6.6. I figured out that if my project is in c drive it works fine while nested in other folders like this C:\udemy\my-app -> this will work fine. However, if it was created in another drive for example D drive. It will run but will produce a blank screen and will produce the error "@ resolveClientReferenceMetadata- error at stringify () null" in the terminal. It will run fine if it is like this D:\my-app for example. As long as the project folder isn't nested in another folder in the D drive for example it will run. As seen in this image. D drive run success

This is what it looks like when it does fail in my D drive. D drive run fail

What I have observed is if my project is running on the same drive as my os it will run fine.

0
Ech0ke On

had the same issue here. I noticed that selecting NOT to use AppRouter made the app compile successfully. So, I made sure I create the project inside my current user directory and not global drive directory. Example: C:\Users\Admin\**

At least for me it fixed the problem.