question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal with sync function

See original GitHub issue

Environment

  • OS Version: Mac OS 10.12.6
  • Node.js Version: v9.4.0

Actual behavior

git clone https://github.com/sindresorhus/globby
npm install
node -e "const fg = require('fast-glob'); fg.sync('**/index.js')"

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
 1: node::Abort() [/usr/local/bin/node]
 2: node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
 3: v8::Utils::ReportApiFailure(char const*, char const*) [/usr/local/bin/node]
 4: node::ReadDir(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 5: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node]
 6: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 7: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 8: 0x11e5eea842fd

When excluding node_modules it works as expected:

node -e "const fg = require('fast-glob'); fg.sync('**/index.js', {ignore: 'node_modules'})" 

With async function is also works:

node -e "const fg = require('fast-glob'); fg('**/index.js', {ignore: 'node_modules'}).then(console.log)" 

Expected behavior

To return the index.js file and not errors out.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pvdlgcommented, Feb 1, 2018

Thanks for the reactivity. It solve the problem in my scenario. Thanks a lot!

0reactions
wilddipcommented, Mar 23, 2019

Again

Read more comments on GitHub >

github_iconTop Results From Across the Web

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
On deasync v0.1.12 on Windows 10, I'm receiving a strange error on Node v8.9.3 with the following code: The loop runs maybe 8-10...
Read more >
node js ToLocalChecked Empty MaybeLocal error
node js crashed with this error i want execute sql query. FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
Read more >
v8 shell crashes with Fatal error in v8::ToLocalChecked Empty ...
A callback throwing an exception is the canonical example of a function that possibly returns no value, in which case its MaybeLocal return ......
Read more >
C++ Add-ons for Node.js v4 - NodeSource
A MaybeLocal has a simple obj.IsEmpty() method to check whether there is a value inside the Local . You can retrieve the underlying...
Read more >
Node.js v19.3.0 Documentation
Functions to convert from C types to Node-API ... --report-filename=filename; --report-on-fatalerror; --report-on-signal ... Useful V8 options.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found