kong-dashbord本地安装gulp打包报错的解决办法
本地安装kong-dashbord执行npm run build 报如下错误
gulp[31507]: ../src/node_contextify.cc:637:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed. 1: 0x100038d1f node::Abort() [/usr/local/bin/node] 2: 0x100037e19 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, char const*, int, v8::Local<v8::Value>*, node::async_context) [/usr/local/bin/node] 3: 0x100060837 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node] 4: 0x10023bf8f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node] 5: 0x10023b128 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]
查了下解决方法说是node升级错误,按照以下步骤顺利运行
rm -fr node_modules rm -fr package-lock.json npm cache clean --force npm install
其中kong-dashbord 本地运行的代码步骤是
git clone https://github.com/PGBI/kong-dashboard.git npm run install npm run build /bin/kong-dashboard.js start --kong-url http://kong-dashbord:8001
打开网址http://localhost:8080/#!/,我们就可以愉快的修改了