question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes after restart: First argument must be file descriptor

See original GitHub issue

Node version: 6.9.5 Platform: Linux (running in docker through this image: https://hub.docker.com/_/node/) babel-watch version: 2.0.5

I can start babel watch and it works fine, will restart on changes successfully a few times and then when it tries to restart for the 2-6ish time, it will crash with the error:

/app/node_modules/babel-watch/babel-watch.js:298
          throw error;
          ^

 TypeError: First argument must be file descriptor
    at TypeError (native)
    at Object.fs.writeSync (fs.js:786:20)
    at error (/app/node_modules/babel-watch/babel-watch.js:289:12)
    at handleFileLoad (/app/node_modules/babel-watch/babel-watch.js:172:7)
    at ChildProcess.app.on (/app/node_modules/babel-watch/babel-watch.js:283:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at process.nextTick (internal/child_process.js:719:12)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

I can then restart it and it will work fine again for a bit, rinse and repeat.

I have been using babel-watch for a while now and never had this problem before.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:21
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
henriquesosacommented, Jan 23, 2018

Any updates?

1reaction
chris-garrettcommented, May 4, 2017

I reverted to 2.0.4. Still crashes in docker but it’s far less frequent.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server's file descriptor crashing after a client execute close()
I have a server that can accept n clients, but when one of them finishes the server's socket throws "bad file descriptor".
Read more >
What happens to file descriptors when the process is killed?
Yes, the file will be automatically closed when the process terminates, regardless of the reason for the process termination.
Read more >
How to Fix the 'Too Many Open Files' Error in Linux?
It means that a process has opened too many files (file descriptors) and cannot open new ones. On Linux, the “max open file...
Read more >
In iOS 15, when the app is restarted, it immediately crashes.
After the iOS 15 update, the following process causes the app to die. Go to the home screen while running the app; Completely...
Read more >
To Set the File Descriptor Limit (Linux)
The number of open file descriptors is limited by the physical memory available to the host. You can determine this limit with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found