Questions tagged [node-deasync]

Use it for any question related to `deasync` module for NodeJS

DeAsync turns async function into sync, implemented with a blocking mechanism by calling Node.js event loop at JavaScript layer. The core of deasync is writen in C++.

https://github.com/abbr/deasync

16 questions
7
votes
0 answers

Ways to deAsync.js on browser (frontend)? browserify

So, I implemented this node.js module which uses deasync.js (as I needed some synchronous computations, and javascript promise was not good enough) Now, I had to import that to frontend side, and call it from the browser. But, it seems like…
6
votes
2 answers

Why do I get these errors: "deasync" & "node build.js", "fsevents" & "node install", "node-gyp", "make" errors on "yarn add"

Please help me make sense of this big fat error output. At this point I don't know which end is up. I have been spinning my wheels for days on this. This is not the first/only package installation that has given me these errors, but the project ran…
csforbes
  • 560
  • 2
  • 5
  • 11
3
votes
1 answer

Windows - Error: Could not locate the bindings file

Stuck with strange error with deasync module. trace: E:\development\oxy\node_modules\deasync\node_modules\bindings\bindings.js:91 throw err ^ Error: Could not locate the bindings file. Tried: тЖТ…
WebArtisan
  • 3,996
  • 10
  • 42
  • 62
2
votes
1 answer

npm deasync cause crash in electron

Environment: Windows 10 Pro (x64) and electron 1.7.9 (also 1.8.3 ) Problem description: The usage of "deasync" node module (version 0.1.11 and also 0.1.12) causes the crash of the renderer process. In electron app, just using var deasync =…
1
vote
1 answer

yarn - installation of deasync fails

When I create a react app on Windows with node 15 like this: yarn create react-app my-project --template typescript It fails with yarn create v1.22.11 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.9: The platform "win32"…
Chui Tey
  • 5,436
  • 2
  • 35
  • 44
1
vote
1 answer

Async vs Deasync in reality

The background I'm writing my next server project in node. The previous version was written in language D, which is majorly an synchronized implementation. We all know, that JS uses a lot of async This is good for performance, but hard to maintain…
stanleyxu2005
  • 8,081
  • 14
  • 59
  • 94
1
vote
0 answers

node.js: deasync never returning

In node.js I'm using deasync to return the result of a request query. var request = require('request'); var deasync = require("deasync"); const URL_1 = "...", URL_2 = "...", USER_AGENT = "..."; function getHtml() { function requrl(url, form) { …
ariel
  • 15,620
  • 12
  • 61
  • 73
0
votes
1 answer

Convert async function consul.kv.get to sync function with deasync

I am trying to convert an async function consul.kv.get to a sync version of the same function. Searching led me to deasync and it's documentation suggests I should be able to do the following: const fn =…
j1n3l0
  • 517
  • 4
  • 16
0
votes
1 answer

Installing Jest in Vue 3 gives error "Cannot locate the bindings file" for deasync on Linux

I want to use the Vue unit test utilities for Jest. This works fine on Windows, but I got an error on Linux. This is what I did: vue create my-project Select Manually select features Select Choose vue version Deselect Babel Select…
www.admiraalit.nl
  • 5,768
  • 1
  • 17
  • 32
0
votes
0 answers

Promise Resolved but Does Not Trigger .then() but Only on Debian server as a Module

I've been having trouble with handling data from MongoDB using MongoJS where I have a promise that refuses to resolve. I am honestly confused why this does not work. It works completely fine on my local machine but once I move it to my server it…
10Nates
  • 102
  • 10
0
votes
0 answers

My Node server is keep restarting due to overflow

I have installed npm forever plugin to restart the server. But somehow its keep restarting every hour with following error: FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal. 1: node::Abort() [node] 2: 0x121a2cc [node] 3:…
SGR Dalal
  • 121
  • 13
0
votes
2 answers

Sleep main thread but do not block callbacks

This code works because system-sleep blocks execution of the main thread but does not block callbacks. However, I am concerned that system-sleep is not 100% portable because it relies on the deasync npm module which relies on C++. Are there any…
danday74
  • 52,471
  • 49
  • 232
  • 283
0
votes
0 answers

How to approach this scenario in async programming /node js

I am writing a service in nodejs. Please read below for the approach i am doing to solve this problem. First I call a rest endpoint(say /offers) to fetch data . say it cloudSenseData Final Response I need to massage/manipulate the data to give back…
0
votes
2 answers

Mongoose synchronousFind

I am trying to build a synchronous mongoose find. I adopted the use of deasync. https://www.npmjs.com/package/deasync This is currently working for saves but it is not working for queries exports.synchronousFind = function (instanceModel, query) { …
CodeMilian
  • 1,262
  • 2
  • 17
  • 41
-1
votes
1 answer

Node js async convert to sync

I need to push data to array synchronously. First API request get image key base one that need to get image data within loop. var deasync = require('deasync'); router.get('/a', function(req, res) { var username="user"; …
1
2