banmanagement / banmanager-webapi Goto Github PK
View Code? Open in Web Editor NEWHTTP GraphQL API
License: MIT License
HTTP GraphQL API
License: MIT License
Hi!
I tried to setup BanManager-WebAPI following this guide
I configured everything (MySQL, domain etc) but right after I created Admin user, I got error and configuration don't finalize.
I tried to install it under Debian 9 (server) and Debian 10 (desktop), same error happened.
OS: Debian 9 and Debian 10
Node: v10.16.3 and 12.9.1
NPM: v6.9.0 and 6.10.2
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'setup' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info lifecycle [email protected]~presetup: [email protected]
6 info lifecycle [email protected]~setup: [email protected]
7 verbose lifecycle [email protected]~setup: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~setup: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/user/Spigot/BanManager-WebAPI/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle [email protected]~setup: CWD: /home/user/Spigot/BanManager-WebAPI
10 silly lifecycle [email protected]~setup: Args: [ '-c', 'node bin/bm-cli setup' ]
11 silly lifecycle [email protected]~setup: Returned: code: 1 signal: null
12 info lifecycle [email protected]~setup: Failed to exec setup script
13 verbose stack Error: [email protected] setup: `node bin/bm-cli setup`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16)
13 verbose stack at EventEmitter.emit (events.js:209:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:209:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/user/Spigot/BanManager-WebAPI
16 verbose Linux 4.19.0-5-amd64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "setup"
18 verbose node v12.9.1
19 verbose npm v6.10.2
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] setup: `node bin/bm-cli setup`
22 error Exit status 1
23 error Failed at the [email protected] setup script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
First of all i'm aware this this is project in development. I wanted to give this feature a little test along with the new web panel.
I've setup a sub domain (api.salyfactory) for the API, running with Plesk.
Enabled nodejs on the machine. The install works well after adding a ".npmrc" file in the root directory of the project. the file contains: "scripts-prepend-node-path=true"
I have to do this to avoid the error "no node binary in the current PATH"
After that install trough plesk i want to execute the setup with "node bin/bm-cli setup"
However i get the following error:
-sh-4.2$ node bin/bm-cli setup
/var/www/vhosts/salyfactory.com/api.salyfactory.com/cli/commands/encrypt.js:11
exports.handler = async function () {
^^^^^^^^
SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at Object.require (internal/module.js:20:19)
at /var/www/vhosts/salyfactory.com/api.salyfactory.com/node_modules/require-directory/index.js:76:17
I tried to run this as the domain user. Or root. Both come up with the same error.
When i run the "setup" script trough the plesk app it somewhat works. but i cant fill anything in there. i get the following output:
[email protected] setup /var/www/vhosts/salyfactory.com/api.salyfactory.com
node bin/bm-cli setup
Starting setup
If unsure, use default
? BanManager UI Site Hostname (http://localhost:3000)
I'm out of ideas on how to continue setting the api up.
Versions:
Node.js: 12.4.0
Thanks in advance!
love your work dude!
Lots of trial/errors to do with JSON API. Clean up the code, reduce duplication etc.
Many of the initial tests are broken. Fix and have better overall coverage.
Currently only requires update.any
, support update.own
Currently deletes from table, but does not create an entry in *_records. This should be optional with a boolean parameter which itself is behind a permission.
As an aside, this mutation should be replaced with punishment specific mutations, i.e. deletePlayerBan, deletePlayerMute etc
Trying to install WebAPI on ubuntu 18.04 using
Error Log
1 verbose cli [ '/root/.nvm/versions/node/v8.12.0/bin/node',
1 verbose cli '/root/.nvm/versions/node/v8.12.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'setup' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info lifecycle [email protected]~presetup: [email protected]
6 info lifecycle [email protected]~setup: [email protected]
7 verbose lifecycle [email protected]~setup: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~setup: PATH: /root/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/banmanager/BanManager-WebAPI/node_modules/.bin:/root/.nv$
9 verbose lifecycle [email protected]~setup: CWD: /home/banmanager/BanManager-WebAPI
10 silly lifecycle [email protected]~setup: Args: [ '-c', 'node bin/bm-cli setup' ]
11 silly lifecycle [email protected]~setup: Returned: code: 1 signal: null
12 info lifecycle [email protected]~setup: Failed to exec setup script
13 verbose stack Error: [email protected] setup: `node bin/bm-cli setup`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301: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.<anonymous> (/root/.nvm/versions/node/v8.12.0/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:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/banmanager/BanManager-WebAPI
16 verbose Linux 4.15.0-74-generic
17 verbose argv "/root/.nvm/versions/node/v8.12.0/bin/node" "/root/.nvm/versions/node/v8.12.0/bin/npm" "run" "setup"
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] setup: `node bin/bm-cli setup`
22 error Exit status 1
23 error Failed at the [email protected] setup script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]```
Use JWT
Migrate to standard, and enable linting checks as part of testing
Hey, me again,
Managed to fix the node.js issue.
however when i go trough the setup it asked me to paste the config.yml.
I do so but i throws me an error that it isnt a valid config.
See here:
https://paste.ubuntu.com/p/JK87sQByyZ/
Ive tried the config with and without comments. or only the database info none worked.
So here is the config: (pretty standard I believe)
https://paste.ubuntu.com/p/nZht5PxY5w/
And maybe its easy to have a quick convo on discord or something, (shorter lines innit)
arriej#9130
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.