Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. abelp
A

abelp

@abelp

Chat Follow Unfollow
1
Reputation
2
Posts
895
Profile views
0
Followers
0
Following
Joined 15 Jun 2020, 19:27 Last Online 2 Jul 2020, 18:23
Location Zaragoza - Spain

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

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 • 16 Jun 2020, 18:28
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 • 15 Jun 2020, 22:04

© 2023 Endel Dreyer