{"id":26578,"library":"v6-game-server","title":"V6 Game Server","description":"A Node.js server for turn-based games (board games, card games, etc.), current version 0.12.396. Provides WebSocket-based multiplayer with configurable turn timers, reconnection handling, spectator mode, MongoDB/Redis integration for persistence and ranking, and admin controls. Differentiators include flexible timer modes (per-turn, per-switch, common time, addTime), penalty/timeout systems, and cheat detection via unfocused turns. Released under an unspecified cadence, likely maintenance mode as updates are infrequent. Primarily documented in Russian.","status":"maintenance","version":"0.12.396","language":"javascript","source_language":"en","source_url":"https://github.com/levserk/v6-game-server","tags":["javascript"],"install":[{"cmd":"npm install v6-game-server","lang":"bash","label":"npm"},{"cmd":"yarn add v6-game-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add v6-game-server","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CJS-only and does not support ESM imports. Attempting to use ES import will throw a SyntaxError.","wrong":"import Server from 'v6-game-server'","symbol":"default","correct":"const Server = require('v6-game-server')"},{"note":"The package exports the constructor as module.exports directly (not a named export). Using destructuring will result in undefined.","wrong":"const { Server } = require('v6-game-server')","symbol":"Server","correct":"const Server = require('v6-game-server').default || require('v6-game-server')"},{"note":"Do not call require with arguments; instantiate after assignment.","wrong":"const server = new require('v6-game-server')(conf, engine)","symbol":"Server","correct":"const Server = require('v6-game-server')"}],"quickstart":{"code":"const Server = require('v6-game-server');\n\nconst conf = {\n    game: 'mygame',\n    port: 8080,\n    turnTime: 60,\n    timeMode: 'reset_every_turn',\n    timeStartMode: 'after_turn',\n    maxTimeouts: 2,\n    mongo: {\n        host: '127.0.0.1',\n        port: '27017'\n    },\n    redis: {\n        host: '127.0.0.1',\n        port: '6379'\n    }\n};\n\nconst engine = {\n    // Your game logic here\n};\n\nconst server = new Server(conf, engine);\nserver.start();","lang":"javascript","description":"Creates and starts a V6 game server with custom configuration and game engine."},"warnings":[{"fix":"Use require() instead of import","message":"package is CJS-only; ESM imports will fail","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use const Server = require('v6-game-server') not const { Server } = require(...)","message":"require returns the Server constructor directly, not an object with a Server property","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure MongoDB and Redis servers are running and accessible or set mode:'develop' to skip DB, but note this may disable some features.","message":"MongoDB and Redis are required for persistence even with mode:'develop'?","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use the correct pattern: const Server = require('v6-game-server'); const server = new Server(conf, engine);","message":"The documentation shows require() with two arguments which is invalid in Node.js","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.12.396':19 'addtim':55 'admin':40 'base':10,23 'board':12 'cadenc':68 'card':14 'cheat':59 'common':53 'configur':26 'control':41 'current':17 'detect':60 'differenti':42 'document':77 'etc':16 'flexibl':44 'game':2,11,13,15 'handl':30 'includ':43 'infrequ':75 'integr':34 'javascript':80 'like':69 'mainten':70 'mode':32,46,71 'mongodb/redis':33 'multiplay':24 'node.js':5 'penalty/timeout':56 'per':48,51 'per-switch':50 'per-turn':47 'persist':36 'primarili':76 'provid':20 'rank':38 'reconnect':29 'releas':64 'russian':79 'server':3,6 'spectat':31 'switch':52 'system':57 'time':54 'timer':28,45 'turn':9,27,49,63 'turn-bas':8 'unfocus':62 'unspecifi':67 'updat':73 'v6':1 'version':18 'via':61 'websocket':22 'websocket-bas':21","created_at":"2026-05-01T13:50:42.269528+00:00","updated_at":"2026-05-01T13:50:42.269528+00:00","problems":[{"fix":"Replace with const Server = require('v6-game-server')","cause":"Using destructuring import like const { Server } = require('v6-game-server') results in undefined","error":"TypeError: Server is not a constructor"},{"fix":"Use require() instead, or convert your project to CommonJS","cause":"Attempting to use ES import syntax with this CJS-only package","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Change conf.port to an available port or kill the process using the port","cause":"Port already in use, or multiple instances trying to use same port","error":"Error: listen EADDRINUSE :::8080"},{"fix":"Start MongoDB or update conf.mongo with correct host/port; or set mode:'develop' to bypass DB","cause":"MongoDB not running or not accessible","error":"MongoError: failed to connect to server [127.0.0.1:27017]"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/levserk/v6-game-server","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/v6-game-server","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database","communication"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}