每当我运行grunt watch
时,都会出现以下错误:
grunt[48126]: ../src/node_contextify.cc:627:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
1: 0x10003a5ab node::Abort() [/usr/local/bin/node]
2: 0x1000396aa node::AddEnvironmentCleanupHook(v8::Isolate*, void (*)(void*), void*) [/usr/local/bin/node]
3: 0x10005d027 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
4: 0x1001d2524 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
5: 0x1001d18ce 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: 0x1001d134a v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x12a0f384fb7d
Abort trap: 6
我在全局安装了grunt-cli@1.3.2,并在我的项目中安装了关于本地开发依赖项的以下内容:
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-requirejs": "^1.0.0",
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-grunticon": "^2.3.1",
"grunt-includes": "^1.0.0",
"grunt-sass": "^2.1.0",
答案 0 :(得分:1)
所以我的节点位于11.0.0,与grunt不兼容。我将其降级为8.1.0,现在可以使用了。