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

Newly created NextJS code wont work on any browsers except Firefox.

Open nylla8444 opened this issue 2 years ago • 0 comments

Link to the code that reproduces this issue

https://github.com/allyn8444/nextjs-issue

To Reproduce

  1. Initialize code by creating new nextjs app npx create-next-app@latest

  2. I just copied the instructions in the nextjs docs. https://nextjs.org/docs/getting-started/installation

  3. cd into your folder and enter npm run dev

  4. A localhost should appear, you can copy and paste it to your browser or cmd + click (im using MacOS)

  5. Since Edge is my default browser, the code should display the template. However, in my case, it won't display. It should display on other browsers as well but in my device, it only runs on Firefox.

Current vs. Expected behavior

I worked with nextjs before and had no problem using Edge. This time when I tried to run (npm run dev) my code it wouldn't work. I tested it in multiple browsers and I discovered that it won't work on any other browsers except Firefox (I tried it in Google, edge, brave, and Firefox).

It is weird because it doesn't throw any error, there is nothing in the console. image image

If I try to run the localhost in Firefox, it will start compiling and output the code. image image

I concluded that it is a nextjs problem since I created a react-vite code and it works on different browsers.

I already tried reinstalling my node, deleting .next and node_modules folder, tried using npm run build and npm run start, but still the same issue.

Also already tried surfing the internet for solutions but nothing seems to work.

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

Middleware / Edge (API routes, runtime), Operating System (Windows, MacOS, Linux)

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

next dev (local), next build (local), next start (local)

Additional context

No response

nylla8444 avatar Jan 30 '24 19:01 nylla8444