PGBI / kong-dashboard

Dashboard for managing Kong gateway
MIT License
2.17k stars 390 forks source link

version 3.3.0 npm start --kong-url http://kong:8001 error #175

Closed JustUse closed 6 years ago

JustUse commented 6 years ago

Issue summary

npm install ---->success npm run build ---->success but when i try to start kong-dashboard ,it got failure

[root@localhost kong-dashboard]# npm start --kong-url http://192.168.0.139:8001

kong-dashboard@3.3.0 start /home/mastercom/kong-dashboard node ./bin/kong-dashboard start "http://192.168.0.139:8001"

bin/kong-dashboard start

Options: -v, --verbose Increase kong-dashboard command line verbosity [boolean] --help Show help [boolean] --version Show version number [boolean] --kong-url, -u Url of Kong admin API [string] [required] -p, --port Port on which Kong Dashboard will be served [number] [default: 8080] --basic-auth Of the form "user1=password1 user2=password2 ...". If set, Kong Dashboard will be protected with basic auth. [array] --api-key API Key to use to connect to Kong admin API if it is protected with key auth [string] --api-key-name Authentication API Key header name [string] [default: "apikey"] -g, --gelato If set, each Kong consumer will be linked with their associated account on Gelato [boolean] --kong-username Username to use to connect to Kong admin API if it is protected with basic auth [string] --kong-password Password to use to connect to Kong admin API if it is protected with basic auth [string] --insecure Authenticated connections to Kong over an insecured protocol won't be accepted unless this option is used [boolean]

Missing required argument: kong-url npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! kong-dashboard@3.3.0 start: node ./bin/kong-dashboard start "http://192.168.0.139:8001" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the kong-dashboard@3.3.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-07-28T16_18_58_839Z-debug.log

cat /root/.npm/_logs/2018-07-28T16_18_58_839Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/home/mastercom/node-v8.11.3-linux-x64/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'start', 1 verbose cli '--kong-url', 1 verbose cli 'http://192.168.0.139:8001' ] 2 info using npm@5.6.0 3 info using node@v8.11.3 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle kong-dashboard@3.3.0~prestart: kong-dashboard@3.3.0 6 info lifecycle kong-dashboard@3.3.0~start: kong-dashboard@3.3.0 7 verbose lifecycle kong-dashboard@3.3.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle kong-dashboard@3.3.0~start: PATH: /home/mastercom/node-v8.11.3-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/mastercom/kong-dashboard/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin 9 verbose lifecycle kong-dashboard@3.3.0~start: CWD: /home/mastercom/kong-dashboard 10 silly lifecycle kong-dashboard@3.3.0~start: Args: [ '-c', 10 silly lifecycle 'node ./bin/kong-dashboard start "http://192.168.0.139:8001"' ] 11 silly lifecycle kong-dashboard@3.3.0~start: Returned: code: 1 signal: null 12 info lifecycle kong-dashboard@3.3.0~start: Failed to exec start script 13 verbose stack Error: kong-dashboard@3.3.0 start: node ./bin/kong-dashboard start "http://192.168.0.139:8001" 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/home/mastercom/node-v8.11.3-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess. (/home/mastercom/node-v8.11.3-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:925:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid kong-dashboard@3.3.0 15 verbose cwd /home/mastercom/kong-dashboard 16 verbose Linux 3.10.0-514.el7.x86_64 17 verbose argv "/home/mastercom/node-v8.11.3-linux-x64/bin/node" "/usr/local/bin/npm" "start" "--kong-url" "http://192.168.0.139:8001" 18 verbose node v8.11.3 19 verbose npm v5.6.0 20 error code ELIFECYCLE 21 error errno 1 22 error kong-dashboard@3.3.0 start: node ./bin/kong-dashboard start "http://192.168.0.139:8001" 22 error Exit status 1 23 error Failed at the kong-dashboard@3.3.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

help ,Thank you in advance。

Your environment

JustUse commented 6 years ago

i also use other version to start ,unfortunately it also failed。 [root@localhost kong-dashboard]# npm start --kong-url http://localhost:8001

kong-dashboard@3.3.0 start /home/centos7.3/kong-dashboard node ./bin/kong-dashboard start "http://localhost:8001"

bin/kong-dashboard start

Options: -v, --verbose Increase kong-dashboard command line verbosity [boolean] --help Show help [boolean] --version Show version number [boolean] --kong-url, -u Url of Kong admin API [string] [required] -p, --port Port on which Kong Dashboard will be served [number] [default: 8080] --basic-auth Of the form "user1=password1 user2=password2 ...". If set, Kong Dashboard will be protected with basic auth. [array] --api-key API Key to use to connect to Kong admin API if it is protected with key auth [string] --api-key-name Authentication API Key header name [string] [default: "apikey"] -g, --gelato If set, each Kong consumer will be linked with their associated account on Gelato [boolean] --kong-username Username to use to connect to Kong admin API if it is protected with basic auth [string] --kong-password Password to use to connect to Kong admin API if it is protected with basic auth [string] --insecure Authenticated connections to Kong over an insecured protocol won't be accepted unless this option is used [boolean]

Missing required argument: kong-url

npm ERR! Linux 3.10.0-514.el7.x86_64 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" "--kong-url" "http://localhost:8001" npm ERR! node v6.14.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! kong-dashboard@3.3.0 start: node ./bin/kong-dashboard start "http://localhost:8001" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the kong-dashboard@3.3.0 start script 'node ./bin/kong-dashboard start "http://localhost:8001"'. 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 "http://localhost:8001" 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/centos7.3/kong-dashboard/npm-debug.log

[root@localhost kong-dashboard]# cat /home/centos7.3/kong-dashboard/npm-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'start', 1 verbose cli '--kong-url', 1 verbose cli 'http://localhost:8001' ] 2 info using npm@3.10.10 3 info using node@v6.14.3 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle kong-dashboard@3.3.0~prestart: kong-dashboard@3.3.0 6 silly lifecycle kong-dashboard@3.3.0~prestart: no script for prestart, continuing 7 info lifecycle kong-dashboard@3.3.0~start: kong-dashboard@3.3.0 8 verbose lifecycle kong-dashboard@3.3.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle kong-dashboard@3.3.0~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/centos7.3/kong-dashboard/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin 10 verbose lifecycle kong-dashboard@3.3.0~start: CWD: /home/centos7.3/kong-dashboard 11 silly lifecycle kong-dashboard@3.3.0~start: Args: [ '-c', 11 silly lifecycle 'node ./bin/kong-dashboard start "http://localhost:8001"' ] 12 silly lifecycle kong-dashboard@3.3.0~start: Returned: code: 1 signal: null 13 info lifecycle kong-dashboard@3.3.0~start: Failed to exec start script 14 verbose stack Error: kong-dashboard@3.3.0 start: node ./bin/kong-dashboard start "http://localhost:8001" 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:920:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 15 verbose pkgid kong-dashboard@3.3.0 16 verbose cwd /home/centos7.3/kong-dashboard 17 error Linux 3.10.0-514.el7.x86_64 18 error argv "/usr/bin/node" "/usr/bin/npm" "start" "--kong-url" "http://localhost:8001" 19 error node v6.14.3 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error kong-dashboard@3.3.0 start: node ./bin/kong-dashboard start "http://localhost:8001" 22 error Exit status 1 23 error Failed at the kong-dashboard@3.3.0 start script 'node ./bin/kong-dashboard start "http://localhost:8001"'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the kong-dashboard package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error node ./bin/kong-dashboard start "http://localhost:8001" 23 error You can get information on how to open an issue for this project with: 23 error npm bugs kong-dashboard 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls kong-dashboard 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

JustUse commented 6 years ago

i use other uesr to npm install, npm run build, npm start --kong-url http://localhost:8001 but failed when startting ! Omg , i will be carzy......

PGBI commented 6 years ago

Please install kong-dashboard globally as explained in the readme.

If you want to build it from sources and start it from there, the correct command is ./bin/kong-dashboard.js start --kong-url http://...