2018-08-13T07:29:43Z||2018-08-13T07:29:43Z
完整的错误信息:
[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
解决方案:
- 确保使用最新版本的yarn, 可以运行
brew upgrade yarn
升级下。 - 删除
node_modules
. - 删除
yarn.lock
. - 运行
yarn
重新安装一切。
再次运行gulp,应该就ok了。