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

server restarted after edit an api's #17

Open
lutfi-haslab opened this issue Feb 1, 2024 · 4 comments
Open

server restarted after edit an api's #17

lutfi-haslab opened this issue Feb 1, 2024 · 4 comments

Comments

@lutfi-haslab
Copy link

How to reproduce:
i have api routes called api/test.js

export const GET = (req, res, next) => {
  res.send("GET REQUEST");
};

and i try to edit the handler

export const GET = (req, res, next) => {
  res.send("GET REQUESTTT");
};

and got:

11:04:06 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:06 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:06 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:06 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:06 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:06 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:07 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:08 AM [vite] server restarted.
Forced re-optimization of dependencies
Forced re-optimization of dependencies (x2)
11:04:09 AM [vite] server restarted.
Port 5173 is in use, trying another one...
11:04:09 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:09 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:09 AM [vite] server restarted.
Forced re-optimization of dependencies
11:04:09 AM [vite] server restarted.
Forced re-optimization of dependencies

How to fix it?

@yracnet
Copy link
Owner

yracnet commented Feb 3, 2024

Hello, could you share a repository with this issue with the node, nmp or yarn versión?, include the package-lock.json please.

I will tried to réplicate this behavior and I can't do it.

@tteke
Copy link

tteke commented Feb 27, 2024

image I have the same issue, i enabled the debug on HMR with "-d hmr" and saw the additional info on the image. It doesnt do this if I start it with --debug

@yracnet
Copy link
Owner

yracnet commented Mar 15, 2024

Hi @tteke , Do you use MACOS? is possible that the MAC create a new hidden files into this directory? because I tested in Windows and Linux in Debug mode and don't have this behavior. Could you check it?

@tteke
Copy link

tteke commented Mar 15, 2024

Hey. Yes I am on MACOS. I just checked the .api directory and there isnt any other hidden filed generated in there.

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

No branches or pull requests

3 participants