Navigation

    Colyseus
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. abelp
    3. Posts
    • Profile
    • More
      • Continue chat with abelp
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    Posts made by abelp

    RE: Problem with colyseus.js and webpack

    SOLVED!
    I had "module": "ES6" in tsconfig.json. Changed to "module": "commonjs", and now can find the colyseus.js module.
    Colyseus is great but configuration files are a nightmare!

    posted in Questions & Help •
    Problem with colyseus.js and webpack

    Hello,
    I'm new with node.js and Colyseus and I'm a little bit confused with configuration files, npm packages, etc.
    I've developed a game using Colyseus. Initially I wrote it in Javascript, and is running ok. After that I migrated code to Typescript and used Wepback in client side. I installed Colyseus.js with npm install --save colyseus.js, and when try to import in my code with import * as Colyseus from "colyseus.js" VS code complaints with "Cannot find module 'colyseus.js' or its corresponding type declarations." Same error when I try compile with webpack.
    My client side programs are in a subfolder of the main project folder. Have I to configure webpack or tsconfig in any special way? Do I need a package.json in my client subfolder? Or the problem is in other side I cannot see...
    Thanks in advance.

    posted in Questions & Help •