我正在尝试部署一个React应用程序。它工作得很好,所有测试都通过了。但它在线人身上被抓住了。
这是错误:
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我认为这与Node版本有关……但我不是很确定。帮助!
这似乎是在同一个问题上,但老实说,我并没有真正得到任何答案:https://github.com/nodejs/node/issues/20285
发布于 2018-05-20 01:20:48
基于Github线程,我假设您在开发工作流中使用了Gulp.js,因此基于它;
节点10已经将其上下文脚本更改为更严格,因此使用它的现有Gulp 3.9.x版本也会抛出错误,使其断言失败。
所以这个问题的解决方案是
1)安装Gulp4并升级您的gulpfile.js可以在UPGRADING YOUR GULP FOR RUNNING WITH NODE 10上的这篇文章中找到有关更改的更多信息
或者干脆
2)将您的node.js版本降级到LTS8.x,直到Gulp4作为默认的npm包发布。
https://stackoverflow.com/questions/50419079
复制相似问题