deasync
deasync copied to clipboard
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
I'm getting this error:
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
1: 0xb09980 node::Abort() [node]
2: 0xa1c235 node::FatalError(char const*, char const*) [node]
3: 0xcf758a v8::Utils::ReportApiFailure(char const*, char const*) [node]
4: 0xa8b12d node::Environment::CheckImmediate(uv_check_s*) [node]
5: 0x156b619 [node]
6: 0x1563d28 uv_run [node]
7: 0x7f5a4c0eebad Run(Napi::CallbackInfo const&) [/mnt/pom/alchemy/core/node_modules/deasync/bin/linux-x64-node-16/deasync.node]
8: 0x7f5a4c0efd83 Napi::details::CallbackData<Napi::Value (*)(Napi::CallbackInfo const&), Napi::Value>::Wrapper(napi_env__*, napi_callback_info__*) [/mnt/pom/alchemy/core/node_modules/deasync/bin/linux-x64-node-16/deasync.node]
9: 0xab44dd [node]
10: 0xd53d8e [node]
11: 0xd551af v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x15f0bf9 [node]
fish: 'node server.js --disable-janeway' terminated by signal SIGABRT (Abort)
I basically wanted to make an annoying ESM-only module synchronous:
var done = false;
var data;
let _module = import('franc');
_module.then(result => {
data = result;
done = true;
}).catch(err => {
done = true;
})
require('deasync').loopWhile(function(){return !done;});
I am having the same problem with Node 20 and Node 21.