Comments (3)
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:
- Create simple project with
app.js
file with the following content:
console.log("Hello");
- Run
babel-watch app.js
- See it runs correctly (prints
Hello
) - Update
app.js
and remove last quotation mark to introduce a syntax error - Get the following error printed:
Babel compilation error SyntaxError: /private/tmp/kaka/app.js: Unterminated string constant (1:12)
> 1 | console.log("Hello)
- Update
app.js
again to get rid of the syntax error - See
babel-watch
restart again and runs the app correctly
from babel-watch.
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.
@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)
- error with ignored file HOT 6
- Error: Cannot find module '@babel/core' (Installing it didn't do anything) HOT 1
- Release needed HOT 3
- How to disable ">>> RESTARTING <<<" message? HOT 3
- why it's faster than the combination of nodemon and babel? HOT 1
- document is not defined HOT 2
- ipranges.json in NPM module HOT 2
- Not restarting when making changes to .graphql files HOT 6
- Watcher is still initialized for files that are ignored HOT 5
- Extension list formatting HOT 1
- TypeError [ERR_INVALID_ARG_TYPE]: The "fd" argument must be of type number HOT 2
- Restarting but not receiving changes for some extensions HOT 3
- JavaScript API? HOT 1
- Support for root-mode option
- babel-watch announcing SIGHUP
- Process doesn't stop on SIGTERM HOT 3
- Unable to transpile node_modules HOT 4
- Application doesn't restart automatically
- Babel-errors are not forwarded to stderr HOT 5
- Degradation after refactoring and another uncaught error location HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-watch.