FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal with sync function
See original GitHub issueEnvironment
- 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:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top 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 >
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 Free
Top 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
Thanks for the reactivity. It solve the problem in my scenario. Thanks a lot!
Again