Giter VIP home page Giter VIP logo

Comments (3)

kmagiera avatar kmagiera commented on May 20, 2024

Thanks @steelbrain for reporting and sorry for not getting back to you earlier.

Would you be able to provide a more specific repro scenario as I couldn't reproduce the issue only based on what you've provided. Here is what I tried:

  1. Create simple project with app.js file with the following content:
console.log("Hello");
  1. Run babel-watch app.js
  2. See it runs correctly (prints Hello)
  3. Update app.js and remove last quotation mark to introduce a syntax error
  4. Get the following error printed:
Babel compilation error SyntaxError: /private/tmp/kaka/app.js: Unterminated string constant (1:12)
> 1 | console.log("Hello)
  1. Update app.js again to get rid of the syntax error
  2. See babel-watch restart again and runs the app correctly

from babel-watch.

steelbrain avatar steelbrain commented on May 20, 2024

Hi @kmagiera

I cannot provide any solid info any time soon but to tell you what fixed the issue for me, I basically wrapped all the fs.*Sync calls with a try { fs.*Sync(...) } catch (_) { process.exit() }

It not only fixed the error for me, but also fixed the scenarios where a babel-watch spawned process will be backgrounded and will take 100% cpu printing only the syscall read kernel error I posted in my first post. I hope this gives you an idea of what the problem might be, my random guess was that the spawned child process was writing to an fd created by the parent and when the parent process crashes it causes a deadlock for the child.

from babel-watch.

kmagiera avatar kmagiera commented on May 20, 2024

@steelbrain thanks anyways. I think that your issue might have been resolved by #38 merged earlier today which basically catches and ignores "EPIPE". That error could've been thrown when child process have died (perhaps due to syntax error) and make parent process hang in trying to write to the pipe. Would you be able to try the newest version and see if you're still having this problem? If so feel free to reopen the issue

from babel-watch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.