Closed MarioMei closed 6 years ago
Tried to use npm start (kong-dashboard version 3.1), also failed . [root@localhost kong-dashboard]# git checkout 3.0 Switched to branch '3.0' [root@localhost kong-dashboard]# git pull Already up-to-date. [root@localhost kong-dashboard]# npm install
[root@localhost kong-dashboard]# [root@localhost kong-dashboard]# npm run build
kong-dashboard@3.1.0 build /home/mei/Software/kong-dashboard gulp build
[03:07:45] Using gulpfile /home/mei/Software/kong-dashboard/gulpfile.js [03:07:45] Starting 'build_js'... [03:07:45] Starting 'build_css'... [03:07:45] Finished 'build_css' after 1.63 ms [03:07:45] Starting 'build_html'... [03:07:46] Finished 'build_html' after 1.57 ms [03:07:52] Finished 'build_js' after 6.47 s [03:07:52] Starting 'build'... [03:07:52] Finished 'build' after 8.53 \u03bcs [root@localhost kong-dashboard]# [root@localhost kong-dashboard]# npm start -- -p 5800
kong-dashboard@3.1.0 start /home/mei/Software/kong-dashboard node ./bin/kong-dashboard start "-p" "5800"
/home/mei/Software/kong-dashboard/node_modules/koa/lib/application.js:61 listen(...args) { ^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.
npm ERR! Linux 3.10.0-693.17.1.el7.x86_64
npm ERR! argv "/home/mei/Software/node-v5.11.1-linux-x64/bin/node" "/home/mei/Software/node-v5.11.1-linux-x64/bin/npm" "start" "--" "-p" "5800"
npm ERR! node v5.11.1
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! kong-dashboard@3.1.0 start: node ./bin/kong-dashboard start "-p" "5800"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kong-dashboard@3.1.0 start script 'node ./bin/kong-dashboard start "-p" "5800"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the kong-dashboard package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/kong-dashboard start "-p" "5800"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kong-dashboard
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls kong-dashboard
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/mei/Software/kong-dashboard/npm-debug.log [root@localhost kong-dashboard]# npm bugs kong-dashboard You have new mail in /var/spool/mail/root [root@localhost kong-dashboard]#
While, if we use the old dash-board version 1.4, it can be started successfully. But the version is not what we need, also it is not fit Kong 0.12.1
[root@localhost kong-dashboard]# pwd /home/mei/Software/kong-dashboard [root@localhost kong-dashboard]# ls bin docker Dockerfile ISSUE_TEMPLATE.md LICENSE nohup.out package.json public src CONTRIBUTING.md docker-compose.yml gulpfile.js lib node_modules npm-debug.log package-lock.json README.md tests [root@localhost kong-dashboard]# git checkout 1.0 Switched to branch '1.0' [root@localhost kong-dashboard]# git pull Already up-to-date. [root@localhost kong-dashboard]# npm install
koa-convert@1.2.0 node_modules/koa-convert kong-dashboard@1.4.0 /home/mei/Software/kong-dashboard \u251c\u2500\u2500 angular@1.4.7 \u251c\u2500\u2500 angular-animate@1.4.7 \u251c\u2500\u2500 angular-route@1.4.7 \u251c\u2500\u2500 angular-sanitize@1.4.7 \u251c\u2500\u2500 basic-auth@1.1.0 \u251c\u2500\u252c koa@1.5.1 \u2502 \u251c\u2500\u2500 composition@2.3.0 \u2502 \u2514\u2500\u2500 koa-compose@2.5.1 \u251c\u2500\u2500 koa-mount@1.3.0 \u251c\u2500\u252c koa-static@2.1.0 \u2502 \u2514\u2500\u2500 debug@2.6.9 \u2514\u2500\u252c materialize-css@0.97.7 \u251c\u2500\u2500 jquery@2.2.4 \u2514\u2500\u252c node-archiver@0.2.0 \u251c\u2500\u2500 fstream@0.1.31 \u2514\u2500\u2500 tar@0.1.20
[root@localhost kong-dashboard]# npm run build
kong-dashboard@1.4.0 build /home/mei/Software/kong-dashboard gulp build
[02:32:52] Using gulpfile /home/mei/Software/kong-dashboard/gulpfile.js [02:32:52] Starting 'build_js'... [02:32:52] Starting 'build_css'... [02:32:52] Finished 'build_css' after 1.16 ms [02:32:52] Starting 'build_html'... [02:32:52] Finished 'build_html' after 1.13 ms [02:32:58] Finished 'build_js' after 6.11 s [02:32:58] Starting 'build'... [02:32:58] Finished 'build' after 2.78 \u03bcs [root@localhost kong-dashboard]# [root@localhost kong-dashboard]# nohup npm start -- -p 5800 & [1] 83032 [root@localhost kong-dashboard]# nohup: ignoring input and appending output to \u2018nohup.out\u2019
[root@localhost kong-dashboard]# netstat -anp |grep 5800
tcp6 0 0 :::5800 :::* LISTEN 83048/node
unix 3 [ ] STREAM CONNECTED 1095800 18484/gvfsd-trash @/dbus-vfs-daemon/socket-8H8cHLGZ
[root@localhost kong-dashboard]#
That's because Kong Dashboard v3 isn't compatible with node 5. See the compatibility matrix in the readme file. You need at least node 6.
Thanks PGBI for the quick response. I will try node 6. one minor question: seems I didn't find the compatibility martrix for node in readme https://github.com/PGBI/kong-dashboard/blob/3.0/README.md. Did I miss something? appreciate it!
Sorry, it is my mistake. the node version is mentioned in the README file, which is required to be >=6.0. thanks!
Hi Pierre,
changed node version to 8.9.4 (no changes for all others). the original issue disappears now. But a new issue as below. would you please help on it? Many thanks!
[root@localhost Software]# kong-dashboard start --kong-url http://10.113.88.35:8001 --port 5800 Connecting to Kong on http://10.113.88.35:8001 ... What's on http://10.113.88.35:8001 isn't Kong
By the way, i've checked Kong's status, it works well. http://10.113.88.35:8001 could be accessed through IE.
[root@localhost Software]# kong health nginx.......running
Kong is healthy at /usr/local/kong [root@localhost Software]# netstat -anp|grep 8001 tcp 0 0 10.113.88.35:8001 0.0.0.0:* LISTEN 24643/nginx: master
After investigation, I figured out that the error was caused by the firewall that blocked the port 8001. I will configure the firewall to allow this port. No far no more questions. Thanks much for the support!
Issue summary
Followed the official installation guide. the installation of kong-dashboard succeeded. [root@localhost docker]# npm install -g kong-dashboard /home/mei/Software/node-v5.11.1-linux-x64/bin/kong-dashboard -> /home/mei/Software/node-v5.11.1-linux-x64/lib/nodemodules/kong-dashboard/bin/kong-dashboard.js /home/mei/Software/node-v5.11.1-linux-x64/lib \u2514\u2500\u2500 kong-dashboard@3.1.0
while, kong-dashboard start failed: [root@localhost docker]# kong-dashboard start --port 5800 /home/mei/Software/node-v5.11.1-linux-x64/lib/node_modules/kong-dashboard/node_modules/koa/lib/application.js:61 listen(...args) { ^^^
SyntaxError: Unexpected token ... at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:387:25) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17) at require (internal/module.js:20:19) at Object. (/home/mei/Software/node-v5.11.1-linux-x64/lib/node_modules/kong-dashboard/lib/server.js:2:11)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
Your environment