TypeError when running in parallel
See original GitHub issueWhen running heml
in parallel, it seems to hit a TypeError
:
TypeError {
message: 'Cannot read property \'get\' of null',
}
Object.render (node_modules/@heml/elements/build/Style.js:104:18)
render (node_modules/@heml/render/build/renderElement.js:70:53)
exports.default (node_modules/@heml/render/build/renderElement.js:27:10)
_callee4$ (node_modules/@heml/render/build/index.js:238:74)
tryCatch (node_modules/regenerator-runtime/runtime.js:65:40)
Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:299:22)
Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:117:21)
I threw together a little repo for easily reproducing the issue.
In case rxjs
is not something you’re familiar with, you can read about exactly what Observable.forkJoin
does here.
Let me know if this issue is known, and if there’s anything I can do to help get it resolved.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
TypeError when trying to run tests in parallel with spawn.
After updating to Django 4.1 I can no longer run my tests in parallel. I get seemingly endless errors in my terminal. (env)...
Read more >TypeError when running tests in parallel · Issue #80 - GitHub
Running tests in parallel is horribly broken on macOS to the point it crashes child processes. But that's unrelated.) ...
Read more >Node.js async parallel "TypeError: task is not a function"
Basically, I have two different files, dashboard.js and Run.js. Dashboard.js module.exports = { func1 : function(){ ...
Read more >Re: [Django] #33891: TypeError when trying to run tests in parallel ...
Re: [Django] #33891: TypeError when trying to run tests in parallel with spawn. ... Run a series of tests in parallel in several...
Read more >Failed to run mocha tests if mocha configured to ... - YouTrack
Failed to run mocha tests if mocha configured to run tests in parallel ... warn mocha-intellij: TypeError: Cannot read property 'length' of undefined...
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
Hey @andrew-ware 👋 Thanks for pointing this out and for creating the repo. I don’t have an answer at the moment, but I am digging into it!
I was looking at the source code for heml. I came across this issue at work, and I was seeing if there’s a quick way to fix it.
The real issue is located here. If you’re compiling multiple emails at once, you’ll come across when one (or more) of these variables becomes null. But it becomes null for every single instance of heml running.
Doing what @andwaredev suggests will help. But using a promised-based queue would make your code a lot cleaner
I’ve used this same Queue in a few of my projects. It’s incredibly useful for stuff like rate limiting. But there is still a problem with this. You’re effectively limited to having only one heml request at a time. So you might be a little slower, depending how many Node API calls Heml has