我正在尝试部署 React 应用程序。它工作正常,所有测试都通过。但它被困在 CI 中。
这是错误:
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
Run Code Online (Sandbox Code Playgroud)
我认为这与 Node 版本有关……但我不太确定。帮助!
这似乎是在同一个问题上,但说实话,我并没有从中得到任何答案:https : //github.com/nodejs/node/issues/20285
基于 Github 线程,我假设您在开发工作流中使用 Gulp.js,因此基于它;
Node 10 已将其上下文脚本更改为更严格,因此使用它的现有 Gulp 3.9.x 版本也会在断言失败时引发错误。
所以解决这个问题的方法是
1) 要么安装 Gulp 4 并升级你的 gulpfile.js 有关更改的更多信息可以在这篇关于升级你的 GULP 以运行节点 10 的文章中找到
或者干脆
2) 将您的 node.js 版本降级到 LTS 8.x,直到 Gulp 4 作为默认 npm 包发布。
| 归档时间: |
|
| 查看次数: |
4917 次 |
| 最近记录: |