I am attempting to deploy a React application. It works fine, all the tests pass. But it gets caught in the CI.
This is the error:
Deploying application
node[5878]: ../src/node_contextify.cc:628:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[1]->IsString()' failed.
1: node::Abort() [node]
2: 0x876c55 [node]
3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [node]
4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [node]
5: 0xacd2df [node]
6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
7: 0xf05d4b8427d
Script failed with status
failed to deploy
I think it has something to do with the Node version... but I'm not really sure. Help!
This seems to be on the same issue, but to be honest I'm not really getting any answers from it: https://github.com/nodejs/node/issues/20285
Based on the Github thread, I assume that you are using Gulp.js in your development workflow, so based on it;
Node 10 has changed their contextify script to be more strict, as a result the existing Gulp 3.9.x version which uses it also throws up error failing their assertion.
So solution to this would be
1) Either install Gulp 4 and upgrade your gulpfile.js More information on changes can be found in this article on UPGRADING YOUR GULP FOR RUNNING WITH NODE 10
or else simply
2) Downgrade your node.js version to LTS 8.x, till Gulp 4 is released as a default npm package.
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