I am running on Mac OS X. I've recently updated node and npm to the latest version, following these accepted answer steps Upgrade Node.js to the latest version on Mac OS . Node: v10.4.1
and npm: 6.1.0
And now when I run my Gulp file, I am getting this error:
gulp[2838]: ../src/node_contextify.cc:629:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
1: node::Abort() [/usr/local/bin/node]
2: node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, char const*, int, v8::Local<v8::Value>*, node::async_context) [/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: 0x211117841bd
8: 0x2111178ee5d
9: 0x2111180b2a0
10: 0x21111793429
11: 0x21111793429
12: 0x21111793429
Abort trap: 6
Does anyone know what is the issue here?
Don't understand why but run npm i natives
solved the problem for me.
A complete artical about this: https://davidsekar.com/nodejs/upgrading-your-gulp-for-running-with-node-v10
gulp 3.x doesn't work with node 10.x
remove gulp
npm rm -g gulp
install gulp-cli (a gulp-cli package was introduced, check it here https://www.npmjs.com/package/gulp-cli)
npm i gulp-cli -g
install gulp v4 locally in your project
npm i gulp@next --save-dev
Last thing you need to make changements to your gulpfile.js, syntax and features changed. So read the artical for that, it's simple and straight forward. Here it is again.
All I needed to do is to update my Gulp version also. Running npm rebuild node-sass
fixed my issue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With