Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Module not found: Can't resolve for client components in NextJS 14 #1064

Open
1 task
SalahAdDin opened this issue Jun 27, 2024 · 5 comments
Open
1 task

Comments

@SalahAdDin
Copy link

What version of million are you using?

1.0.0-faire.6

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Manjaro Linux

What browser are you using?

Firefox

Describe the Bug

When running our NextJS project after installing Million Lint, the site is not loaded and the console gives us the following issue:

> [email protected] dev /home/luisalaguna/Projects/TRT/twe_fe_next
> next dev

  ▲ Next.js 14.2.3
  - Local:        http://localhost:3000
  - Environments: .env

 ✓ Starting...

 ⚡ Million Lint v1.0.0-faire.6
 - Ingest server: http://localhost:42423

 ✓ Ready in 0.15ms
 ✓ Ready in 4.8s
 ✓ Compiled /src/middleware in 182ms (96 modules)
 ○ Compiling /[locale] ...
 ⨯ ./src/app/_components/navigation/Header/Header.tsx:79:75
Module not found: Can't resolve 'src/app/_components/navigation/Header/Header.tsx'
  77 |     }
  78 |   } else if (module.hot) {
> 79 |     module.hot.accept("src/app/_components/navigation/Header/Header.tsx", () => {
     |                                                                           ^
  80 |       _c();
  81 |     });
  82 |   }

https://nextjs.org/docs/messages/module-not-found
 ⨯ ./src/app/_components/navigation/Header/Header.tsx:79:75
Module not found: Can't resolve 'src/app/_components/navigation/Header/Header.tsx'
  77 |     }
  78 |   } else if (module.hot) {
> 79 |     module.hot.accept("src/app/_components/navigation/Header/Header.tsx", () => {
     |                                                                           ^
  80 |       _c();
  81 |     });
  82 |   }

https://nextjs.org/docs/messages/module-not-found
 GET /en 500 in 10244ms

This only happen to client components.

What's the expected result?

It should run the project properly.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/nextjs-gunq6c

Participation

  • I am willing to submit a pull request for this issue.
Copy link

Thanks for opening this issue! A maintainer will review it soon.

@NisargIO
Copy link
Collaborator

NisargIO commented Oct 1, 2024

Hi @SalahAdDin, we’ve just deployed a fix for you! Can you try running the setup script npx million@latest. Once it's done, please restart your VSCode/Cursor. Let me know if that works for you!

@SalahAdDin
Copy link
Author

Hi @SalahAdDin, we’ve just deployed a fix for you! Can you try running the setup script npx million@latest. Once it's done, please restart your VSCode/Cursor. Let me know if that works for you!

Do I need to sign in to the VS Code extension?

@NisargIO
Copy link
Collaborator

NisargIO commented Oct 1, 2024

Hi @SalahAdDin, we’ve just deployed a fix for you! Can you try running the setup script npx million@latest. Once it's done, please restart your VSCode/Cursor. Let me know if that works for you!

Do I need to sign in to the VS Code extension?

It is not necessary, but for the full experience you will need to

@SalahAdDin
Copy link
Author

Hi @SalahAdDin, we’ve just deployed a fix for you! Can you try running the setup script npx million@latest. Once it's done, please restart your VSCode/Cursor. Let me know if that works for you!

Do I need to sign in to the VS Code extension?

It is not necessary, but for the full experience you will need to

Have to check it then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants