vercel / next.js

The React Framework
https://nextjs.org
MIT License
126.43k stars 26.91k forks source link

Dev compiling is stuck #47821

Open sanjarbek-ismatov opened 1 year ago

sanjarbek-ismatov commented 1 year ago

Verify canary release

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.15.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.2.4
      eslint-config-next: 13.2.4
      react: 18.2.0
      react-dom: 18.2.0

warn  - Latest canary version not detected, detected: "13.2.4", newest: "13.2.5-canary.26".
        Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.  
        Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

Link to the code that reproduces this issue

.

To Reproduce

Снимок экрана (28)

Describe the Bug

in enabled app directory next js app, if i start development mode, compiler is stuck (npm run dev). Showing message: wait - compiling /page (client and server)... . Sometime works, sometimes doesn't work.

Expected Behavior

Only it's work

Which browser are you using? (if relevant)

Chrome latest

How are you deploying your application? (if relevant)

next start

tavurth commented 1 year ago

For me it was "next": "canary" that was causing a new similar bug just now.

Reverting to "next": "13.2.4" fixed it for me.

joacub commented 1 year ago

For me it was "next": "canary" that was causing a new similar bug just now.

Reverting to "next": "13.2.4" fixed it for me.

He is using that version already, try installing latest canary version …27 will probably resolve.

superssingh commented 1 year ago

To solve this issue, just install latest version 13.2.5-canary.27. Type like this in terminal - npm install next@13.2.5-canary.27 that's it.

yachtcareerhub commented 1 year ago

npm install next@13.2.5-canary.27

Have been having the same issue for the last few days. Installing the latest version doesn't fix it for me.

rahulps1000 commented 1 year ago

Hi, I am also having the same issue with canary.31 as well. If you have any solution please let me know.

sanjarbek-ismatov commented 1 year ago

If this bug show, try next@latest (in me, it's fixing for a short time)

rahulps1000 commented 1 year ago

I found that we need to open http://localhost:3000/ it in any of the browser for the rest of the compilation to work.

please try ot out and close this issue if it got resolved.

sanjarbek-ismatov commented 1 year ago

I found that we need to open http://localhost:3000/ it in any of the browser for the rest of the compilation to work.

please try ot out and close this issue if it got resolved.

No. I know. But when I open localhost:3000 it shows error

yachtcareerhub commented 1 year ago

So this is what's working for me now. I've added --turbo flag to scripts.dev in package.json.

{
  "scripts": {
    "dev": "next dev --turbo",
    ...
  },
  ...
}

So far npm run build is still not compiling on my computer but at least it's working in the Bitbucket pipelines. Would be perfect if I would be able to build it locally as well.

CreatorLZ commented 1 year ago

i'm having this error too!. seems almost everyone is having this same error. is there a sure fix?

bsheratlumi commented 10 months ago

In my experience, starting http://localhost:3000/, or your port, is necessary for Next.js to finish compiling

KimCCode commented 10 months ago

Yep opening http://localhost:3000 worked for me as well

BongBongBang commented 9 months ago

Same situation... Next version: 14.0.4-canary.17 I found this only occurs for windows, not for Mac , for me at least. Solution: use 'next dev' not 'next dev --turbo'. close the turbopack.

kallezz commented 8 months ago

Had this problem on 14.1.0, what yachtcareerhub posted, using the turbo flag fixes it.

titoadeoye commented 8 months ago

Had this problem on 14.1.0, what yachtcareerhub posted, using the turbo flag fixes it.

Currently have this issue on 14.1.0

bernii commented 7 months ago

same problems with 14.1.0/14.1.1 and latest canary compilation hangs when I try to access any app-router based page (typescript 5.3.3)

metacop commented 7 months ago

i'm having this error too!. seems almost everyone is having this same error. is there a sure fix?

Did you find a solution?

andriy-shymkiv commented 6 months ago

having the same issue - "next": "^14.1.4" with next@canary installed

metacop commented 6 months ago

having the same issue - "next": "^14.1.4" with next@canary installed

my problem was tailwind config.

kristiegiles commented 6 months ago

having the same issue - "next": "^14.1.4" with next@canary installed

my problem was tailwind config.

how did you fix it?

metacop commented 6 months ago

having the same issue - "next": "^14.1.4" with next@canary installed

my problem was tailwind config.

how did you fix it?

Yes, it is related to CSS.

  1. first check the globalss.css
  2. tailwind.config.ts
/** @type {import('tailwindcss').Config} */
import withMT from '@material-tailwind/react/utils/withMT';
const config = withMT({
    content: [
        './src/auth/components/FormLogin.tsx',
        // './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
        './src/components/**/*.{js,ts,jsx,tsx,mdx}',
        // './src/app/**/**/*.{js,ts,jsx,tsx,mdx}',
        // './src/app/**/*.{js,ts,jsx,tsx,mdx}',
        // './src/app/**/**/*.{js,ts,jsx,tsx,mdx}',

        './src/**/**/*.{js,ts,jsx,tsx,mdx}',
        './**/**/**/**/*.{js,ts,jsx,tsx,mdx}',
        // './src/app/login/*.{js,ts,jsx,tsx,mdx}',
    ],

    theme: {
        extend: {},
    },
    plugins: [],
});

export default config;
navanshu commented 5 months ago

Same issue here using next 14.2.3 and tailwind 3.4.3, even turbo doesn't fixes it

timneutkens commented 5 months ago

In order to help me investigate this I'll ideally need an application that can be run, if you can't provide that (I understand if you can't) please provide the .next/trace file.

If possible follow these steps which would give me the best picture to investigate:

ADTC commented 5 months ago

Having issue with Next.js 14.2.3 as well. I don't have Tailwind or Turbo. A restart of the server sometimes fixes it, but there's no guarantee. I am on macOS Sonoma, in Apple Silicon, if that matters.

tseijp commented 5 months ago

Having issue with Next.js 14.2.3 as well. I don't have Tailwind or Turbo. A restart of the server sometimes fixes it, but there's no guarantee. I am on macOS Sonoma, in Apple Silicon, if that matters.

same (; _ ;) (It worked for me with next dev --turbo

auspy commented 3 months ago

had issue in tailwind config. i had change path from entire dir to some specific dir. old - not working path: "./node_modules/lib_name/**/*.{js,ts,jsx,tsx}", working path: "./node_modules/lib_name/dist/**/*.{js,ts,jsx,tsx}",

MohamedBechirMejri commented 3 months ago

my issue was tailwind config. I was migrating from pages router to app router and I think the old config was scanning node_modules which resulted in compilation seeming stuck.

if you're not using tailwind make sure another lib isn't doing the same thing image

KinanGH98 commented 1 week ago

In my case, disabling the VPN did the trick.