socket hang up when using file watchers
See original GitHub issueEnvironment
Nuxt CLI v3.0.0-27419629.87eb7d0 RootDir: D:\develop\nuxt3-app Nuxt project info:
- Operating System:
Windows_NT
- Node Version:
v16.11.1
- Nuxt Version:
3.0.0-27419629.87eb7d0
- Package Manager:
npm@8.0.0
- Bundler:
Vite
- User Config:
css
,nitro
,vue
- Runtime Modules:
-
- Build Modules:
-
Reproduction
- If using IntelliJ install the plugin “File Watchers” and add a watcher for SCSS files. May also work with other IDEs.
- Create a .scss-file (e.g.
/assets/styles/main.scss
) - start Vite dev-server
- edit the created scss-file
Describe the bug
If using a file watcher for transpiling scss to css and then changing the scss, the watcher generates a new css file. When registering file changes (may be the change of the .scss file) Vite dev-server rebuilds its files and then the following error occurs.
I think the error occurs, because the filewatcher is writing the css-file while Vite dev-server tries to read it.
Additional context
No response
Logs
ERROR [proxy] socket hang up
at connResetException (node:internal/errors:691:14)
at Socket.socketOnEnd (node:_http_client:471:23)
at Socket.emit (node:events:402:35)
at Socket.emit (node:domain:475:12)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Postman : socket hang up - Stack Overflow
Socket hang up, error is port related error. I am sharing my experience. When you use ... Are you using nodemon, or some...
Read more >NodeJS - What does socket hang up actually mean - Edureka
Your answer When you send a request to a distant server as a client and don't get a response in a timely manner....
Read more >How to handle a socket hang up error in Node.js usually - Quora
Socket hang up error are usually errors when requests coming to your server are more than it can handle. This might be b...
Read more >Socket hang up while taking CSV report - Kibana
But I get the socket hang up error in Kibana; which eventually leads to ... false xpack.watcher.enabled: false xpack.security.enabled: false ...
Read more >Error when running exp publish: socket hang up - Expo Forums
RequestError: Error: socket hang up while after using "exp build:android" or ... inotify is the system that watchman (a file watcher made by ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t use scss and also have this problem
I have had this problem since the first version of Nuxt 3 beta (with Vite). Basically, it can be fixed by a change (for example, by adding an empty space in the vue file) and it works again. But it’s quite annoying during development. In my team, the
socket hang up
is displayed several times an hour. Yuck … @danielroe @pi0 you have no idea where the problem may be? It would be great to get rid of this long-standing bug. Thanks for response!My log output:
Nuxt project info: