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.

Native crash in Node 10

See original GitHub issue

I installed Node 10 on MacOS and Win 10. Used it for various node things with no issues. But starting gulp always results in a native crash. Smells like a Node bug but I report it here because I haven’t seen it anywhere else.

Same steps for Mac or Win…

  • Have empty gulpfile.js
  • Run gulp
  • See crash output:
$ gulp
[21:08:45] Using gulpfile ~/code/gulptest/gulpfile.js
gulp[62193]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
 1: node::Abort() [/Users/roblou/.nvm/versions/node/v10.0.0/bin/node]
 2: node::InternalCallbackScope::~InternalCallbackScope() [/Users/roblou/.nvm/versions/node/v10.0.0/bin/node]
 3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/roblou/.nvm/versions/node/v10.0.0/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/Users/roblou/.nvm/versions/node/v10.0.0/bin/node]
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(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) [/Users/roblou/.nvm/versions/node/v10.0.0/bin/node]
 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/roblou/.nvm/versions/node/v10.0.0/bin/node]
 7: 0x2ee39308427d
[1]    62193 abort      gulp

Same result if I run ./node_modules/.bin/gulp

What version of gulp are you using? What versions of npm and node are you using?

$ gulp -v [21:10:31] CLI version 3.9.1 [21:10:31] Local version 3.9.1 $ node -v v10.0.0

If you can’t reproduce this, I’m happy to debug more, but since I see it in 2 different environments, hopefully it’s easy to reproduce.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:53
  • Comments:31 (10 by maintainers)

github_iconTop GitHub Comments

87reactions
Carlos7646commented, Apr 26, 2018

Same issue with the console output.

macOS Sierra 10.12.6
$ node -v
v10.0.0
$ gulp
gulp[3975]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion args[1]->IsString()' failed.
 1: node::Abort() [/usr/local/bin/node]
 2: node::Assert(char const* const (*) [4]) [/usr/local/bin/node]
 3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(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]
 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 7: 0x93d7aa8427d
[1]    3975 abort      gulp

Solution is delete node_modules dir and package-lock.json. Then run sudo npm install --unsafe-perm=true Thanks the information from @roblourens @MichaReiser @phated @tdmalone .

15reactions
tdmalonecommented, Apr 26, 2018

@phated Got it - thank you! I did indeed get confused.

For others coming across this, here’s what you need to do for Node 10 support (if using Yarn):

  • Find natives@^1.1.0 in your lock file
  • Change it to natives@^1.1.3
  • Run yarn

If using npm with a package-lock.json the process will probably be fairly similar.

(Be careful modifying your lock file. There’s probably a better way to do it!)

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native App crashes after updating Node Version
If you don't plan to upgrade your react-native version, downgrade your node version to the one compatible with your project.
Read more >
6 reasons your Node.js apps are failing
Unresponsive application, possibly looping or hanging; Poor performance; Crash or abort in native code; Unexpected application behavior or functional issue. The ...
Read more >
Errors | Node.js v19.3.0 Documentation
Throwing an error inside the callback can crash the Node.js process in most cases ... The default value is 10 but may be...
Read more >
react-native-crash-tester
react-native-crash-tester. TypeScript icon, indicating that this package has built-in type declarations. 0.2.3 • Public • Published 2 months ...
Read more >
Electron: Build cross-platform desktop apps with JavaScript ...
Electron embeds Chromium and Node.js to enable web developers to create ... Automatically collect JavaScript and native crash data from your users with...
Read more >

github_iconTop Related Medium Post

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