Navigation

    Colyseus
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. vishwasgagrani
    vishwasgagrani

    vishwasgagrani

    @vishwasgagrani

    Chat Follow Unfollow
    0
    Reputation
    6
    Posts
    1019
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Continue chat with vishwasgagrani
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    vishwasgagrani Follow

    Posts made by vishwasgagrani

    RE: npm start does not work on vps (sovled)

    Anyway I looked into package.json and saw this list:

    "@types/cors": "^2.8.6",
    "@types/express": "^4.17.1",
    "copyfiles": "^2.4.1",
    "rimraf": "^2.7.1",
    "ts-node": "^8.1.0",
    "ts-node-dev": "^1.0.0-pre.63",
    "typescript": "^3.4.5"

    And after installing ts-node-dev using:
    npm i ts-node-dev --save-dev

    I see the server running at 2567
    Listening on ws://localhost:2567

    Got it working for now. Thanks.

    posted in Questions & Help •
    RE: npm start does not work on vps (sovled)

    Tried using -only=dev , but does not seems to solve the problem. Same error again. It is asking for peer dependencies though.

    npm install --only=dev
    npm WARN @colyseus/social@0.10.9 requires a peer of express-jwt@^5.3.1 but none is installed. You must install peer dependencies yourself.
    npm WARN colyseus-examples@1.0.1 No repository field.

    audited 346 packages in 4.513s
    found 1 low severity vulnerability
    [root@server colyseus-official-examples]# npm start

    colyseus-examples@1.0.1 start /var/www/html/001-codex/colyseus-official-examples
    ts-node-dev --respawn --transpile-only src/index.ts

    sh: ts-node-dev: command not found
    npm ERR! code ELIFECYCLE
    npm ERR! syscall spawn
    npm ERR! file sh
    npm ERR! errno ENOENT
    npm ERR! colyseus-examples@1.0.1 start: ts-node-dev --respawn --transpile-only src/index.ts
    npm ERR! spawn ENOENT
    npm ERR!
    npm ERR! Failed at the colyseus-examples@1.0.1 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/2021-05-17T09_12_57_957Z-debug.log

    [root@server colyseus-official-examples]#

    posted in Questions & Help •
    npm start does not work on vps (sovled)

    I checked the haxe official examples. While npm install and npm start worked fine locally. But when I tried to put them on my hosting's Vps it gave me this error:

    [root@server colyseus-official-examples]# npm start

    colyseus-examples@1.0.1 start /var/www/html/001-codex/colyseus-official-examples
    ts-node-dev --respawn --transpile-only src/index.ts

    sh: ts-node-dev: command not found
    npm ERR! code ELIFECYCLE
    npm ERR! syscall spawn
    npm ERR! file sh
    npm ERR! errno ENOENT
    npm ERR! colyseus-examples@1.0.1 start: ts-node-dev --respawn --transpile-only src/index.ts
    npm ERR! spawn ENOENT
    npm ERR!
    npm ERR! Failed at the colyseus-examples@1.0.1 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/2021-05-15T09_47_00_680Z-debug.log


    Here is the content of log file:
    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
    2 info using npm@6.12.0
    3 info using node@v12.13.0
    4 verbose run-script [ 'prestart', 'start', 'poststart' ]
    5 info lifecycle colyseus-examples@1.0.1~prestart: colyseus-examples@1.0.1
    6 info lifecycle colyseus-examples@1.0.1~start: colyseus-examples@1.0.1
    7 verbose lifecycle colyseus-examples@1.0.1~start: unsafe-perm in lifecycle true
    8 verbose lifecycle colyseus-examples@1.0.1~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/html/001-codex/colyseus-official-examples/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
    9 verbose lifecycle colyseus-examples@1.0.1~start: CWD: /var/www/html/001-codex/colyseus-official-examples
    10 silly lifecycle colyseus-examples@1.0.1~start: Args: [ '-c', 'ts-node-dev --respawn --transpile-only src/index.ts' ]
    11 info lifecycle colyseus-examples@1.0.1~start: Failed to exec start script
    12 verbose stack Error: colyseus-examples@1.0.1 start: ts-node-dev --respawn --transpile-only src/index.ts
    12 verbose stack spawn ENOENT
    12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
    12 verbose stack at ChildProcess.emit (events.js:210:5)
    12 verbose stack at maybeClose (internal/child_process.js:1021:16)
    12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
    13 verbose pkgid colyseus-examples@1.0.1
    14 verbose cwd /var/www/html/001-codex/colyseus-official-examples
    15 verbose Linux 2.6.32-042stab120.19
    16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
    17 verbose node v12.13.0
    18 verbose npm v6.12.0
    19 error code ELIFECYCLE
    20 error syscall spawn
    21 error file sh
    22 error errno ENOENT
    23 error colyseus-examples@1.0.1 start: ts-node-dev --respawn --transpile-only src/index.ts
    23 error spawn ENOENT
    24 error Failed at the colyseus-examples@1.0.1 start script.
    24 error This is probably not a problem with npm. There is likely additional logging output above.
    25 verbose exit [ 1, true ]

    posted in Questions & Help •
    RE: State.hx:13: Type not found : MapSchema when trying colyseus with haxe/openfl.

    Figured it out. The state.hx needs one more line:
    import io.colyseus.serializer.schema.types.*;

    So the code becomes:

    import io.colyseus.serializer.schema.;
    import io.colyseus.serializer.schema.types.;

    class State extends Schema {
    @:type("map", Player)
    public var players: MapSchema<Player> = new MapSchema<Player>();

    }

    posted in Questions & Help •
    RE: State.hx:13: Type not found : MapSchema when trying colyseus with haxe/openfl.

    When I use the command:
    openfl test html5
    It says:

    Source/State.hx:13: characters 22-39 : Type not found : MapSchema

    The command for openfl works fine for other projects.

    posted in Questions & Help •
    State.hx:13: Type not found : MapSchema when trying colyseus with haxe/openfl.

    Downloaded the example from here:
    https://github.com/colyseus/colyseus-examples

    I get error from State.hx :

    import io.colyseus.serializer.schema.*;

    class State extends Schema {
    @:type("map", Player)
    public var players: MapSchema<Player> = new MapSchema<Player>();

    }

    I have already installed
    Haxe, OpenFL, Lime, colyseus, colyseus-websocket

    How can I sort the error?

    posted in Questions & Help •