NextJS 13 app sometimes does not run

Problem description:
When running my NextJS app by executing npm run dev or next dev, the following is returned:

> next dev

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
(node:21010) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
- event compiled client and server successfully in 200 ms (20 modules)
- wait compiling...
- event compiled client and server successfully in 158 ms (20 modules)

As one can see, the “/” route is not compiled and no display is output to the web view.

I’m using:

replit.nix:

{ pkgs }: {
	deps = [
		pkgs.nodejs-18_x
    pkgs.nodePackages.typescript-language-server
    pkgs.yarn
    pkgs.replitPackages.jest
	];
}

package.json:

  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "autoprefixer": "10.4.14",
    "mongoose": "^7.3.1",
    "eslint": "8.43.0",   
    "next": "13.4.7",
    "postcss": "8.4.24",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-icons": "^4.10.1",
    "tailwindcss": "3.3.2"
  }

I’ve tried stopping and restarting the instance, removing and rebuilding my .node-modules directory, removing my .next directory with no success.

Hey @slay3r9903, welcome to the forums.

Can you send the link to your Repl?

1 Like

https://replit.com/@slay3r9903/playground?s=app

Any ideas?
Thanks for the welcome message.

Are you using Turbopack?

1 Like

I don’t think I am.
I’m not even sure what that is.

It seems to be working fine now. Are you still experiencing this issue?

Looks like it’s working now.
Was anything done?

Looks like the bug fixed itself

I made a test Replit and the same behavior happens:

https://replit.com/@slay3r9903/TestNextJS