-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
windows serverMiddleware HMR edge case #7097
Comments
Hi, @usb248 thanks for reporting the issue. But without repro, it is impossible to debug. Would you please share nuxt config or more details? |
This evening no, tomorrow. But i can say now that i have:
An index.js and others directories inside |
Hi, @usb248 I tried using provided parts but could not reproduce yet. maybe because something special is inside server middleware or API? I added a quick fix commit (4b34941) to ensuring entry is in the graph but seems the root cause is an entry point is not being tracked. If you had time, would you please to debug this? Either if you can give me (privately) access to project with this problem or yourself can start by editing debounce((event, fileName) => {
+ if (!dep2Entry[fileName]) {
+ console.warn('HMR Entrypoint is missing but reloaded: ' + fileName)
+ return
+ }
for (const entry of dep2Entry[fileName]) { |
@pi0 yes. index.js in api folder seems to cause the problem... Content of this file :
|
@usb248 My most guess is that it is a windows issue. Will try on windows machine :) |
let me know if this is the case. |
Probably windows screws up filePaths. For a temporary solutions, may install linux subsystem on windows (Will speed up dev too ;-)) |
Update: This issue is happening for windows users that have a serverMiddleware registered with implicit
|
Hi again. It should be fixed on 2.12.2 :) |
Version
v2.12.0
Reproduction link
https://jsbin.com/
Steps to reproduce
Modify a servermiddleware file
What is expected ?
No script crash
What is actually happening?
D:\wamp64\www...\node_modules@nuxt\builder\dist\builder.js:6160
for (const entry of dep2Entry[fileName]) {
^
TypeError: dep2Entry[fileName] is not iterable
The text was updated successfully, but these errors were encountered: