Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pvdlg opened this issue Jan 30, 2018 · 7 comments
Closed

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

pvdlg opened this issue Jan 30, 2018 · 7 comments
Assignees

Comments

@pvdlg
Copy link

pvdlg commented Jan 30, 2018

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.

@mrmlnc
Copy link
Owner

mrmlnc commented Jan 30, 2018

Hello, @pvdlg,

Yeap, this is known issue. You can follow #42. Unfortunately, this is a problem in dependencies.

@mrmlnc
Copy link
Owner

mrmlnc commented Jan 30, 2018

Closed as duplicate for #42.

@mrmlnc mrmlnc closed this as completed Jan 30, 2018
@pvdlg
Copy link
Author

pvdlg commented Jan 30, 2018

Ha sorry. I didn't realize it was a duplicate.

@mrmlnc
Copy link
Owner

mrmlnc commented Jan 30, 2018

Yeap. I try to find time to fix problem in the readdir-enhanced, but until I see one solution: use iterative solution instead of recursive.

@mrmlnc
Copy link
Owner

mrmlnc commented Feb 1, 2018

@pvdlg,

Please, try to use npm i fast-glob@next --force for your broken cases. I tried to fix the problem with large directories, temporarily switching to the readdir-enhanced fork.

@pvdlg
Copy link
Author

pvdlg commented Feb 1, 2018

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

@wilddip
Copy link

wilddip commented Mar 23, 2019

Again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants