You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm having issues building the project and I wonder if anyone else is experiencing this or if I'm missing some steps.
Steps to Reproduce
Download the code from master (same issue with the 0.14.18 release)
Run "npm install" to install the dependencies
Run "npm run build" to build
Build fails as follow:
For the code from master:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
packages\core\src\Protocol.ts (5:7)
3:
4: // Colyseus protocol codes range between 0~100
5: export enum Protocol {
__________^
For the 0.14.18 release:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
packages\core\src\Server.ts (19:7)
17:
18: // IServerOptions &
19: export type ServerOptions = {
___________^
I have checked and I seem to have all of the rollup plugins installed.
I have tried to downgrade to Typescript 4.2.4 but that didn't change anything.
Context
I'm making some changes to the Colyseus source code and I'm trying to build it so it's easier to manage in the project I'm working on.
I understand this might be an issue with Rollup and Typescript but I am able to run the steps described above and build successfully the colyseus.js client library as well as colyseus/schema. If I run npm install and npm run build, I'm able to generate the build, dist and lib folders for these two modules.
Please let me know if I'm doing anything wrong. Thanks!
Hi @r301, there's another step required before building:
npm install
npm run boot
npm run build
Let me know if that works for you.
It used to be easier to fork and make changes to Colyseus before we adopted a monorepo structure. If you have any ideas to make it easier to make manual changes and consume the forked module I'm open to suggestions. Cheers!
Hi @endel, gotcha! Good to know all the steps, although it didn't solve the issue.
I think you are right, it is a Windows + @rollup/plugin-typescript issue.
Because you mentioned Windows, I assumed there was no issue on Mac and sure enough, I was able to build the project using the Windows Subsystem for Linux!
I'll work with that for now :) Thanks a lot 👍 !
Hi, I'm having issues building the project and I wonder if anyone else is experiencing this or if I'm missing some steps.
Steps to Reproduce
For the code from master:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
packages\core\src\Protocol.ts (5:7)
3:
4: // Colyseus protocol codes range between 0~100
5: export enum Protocol {
__________^
For the 0.14.18 release:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
packages\core\src\Server.ts (19:7)
17:
18: // IServerOptions &
19: export type ServerOptions = {
___________^
I have checked and I seem to have all of the rollup plugins installed.
I have tried to downgrade to Typescript 4.2.4 but that didn't change anything.
Context
I'm making some changes to the Colyseus source code and I'm trying to build it so it's easier to manage in the project I'm working on.
I understand this might be an issue with Rollup and Typescript but I am able to run the steps described above and build successfully the colyseus.js client library as well as colyseus/schema. If I run
npm install
andnpm run build
, I'm able to generate the build, dist and lib folders for these two modules.Please let me know if I'm doing anything wrong. Thanks!
Your Environment
+-- @colyseus/arena@0.14.24 -> .\packages\arena
| +-- @colyseus/core@0.14.28 -> .\packages\core
| +-- @types/cors@2.8.10
| +-- @types/dotenv@8.2.0
| +-- cors@2.8.5 deduped
| +-- dotenv@8.6.0
| +-- express@4.17.1 deduped
|
-- uwebsockets-express@1.1.10 +-- @colyseus/core@0.14.28 -> .\packages\core | +-- @colyseus/schema@1.0.25 | +-- @gamestdio/timer@1.3.2 | +-- @types/redis@2.8.30 | +-- debug@4.3.2 | +-- internal-ip@4.3.0 | +-- nanoid@2.1.11 |
-- notepack.io@2.3.0+-- @colyseus/example@0.14.21 -> .\packages\example
| +-- @colyseus/monitor@0.14.22 -> .\packages\monitor
|
-- colyseus@0.14.23 -> .\bundles\colyseus +-- @colyseus/fossil-delta-serializer@0.14.21 -> .\packages\serializer\fossil-delta-serializer | +-- @colyseus/core@0.14.28 -> .\packages\core | +-- fast-json-patch@2.2.1 | +-- fossil-delta@1.0.2 |
-- notepack.io@2.3.0 deduped+-- @colyseus/loadtest@0.14.7 -> .\packages\loadtest
| +-- @types/blessed@0.1.19
| +-- blessed@0.1.81
| +-- colyseus.js@0.14.13 deduped
| +-- minimist@1.2.5 deduped
| +-- ts-node@7.0.1 deduped
| +-- typescript@4.3.5 deduped
|
-- ws@7.5.4 +-- @colyseus/mikro-orm-driver@0.14.21 -> .\packages\drivers\mikro-orm-driver | +-- @colyseus/core@0.14.28 -> .\packages\core |
-- @mikro-orm/core@4.5.7+-- @colyseus/mongoose-driver@0.14.22 -> .\packages\drivers\mongoose-driver
| +-- @colyseus/core@0.14.28 -> .\packages\core
|
-- mongoose@5.13.2 +-- @colyseus/monitor@0.14.22 -> .\packages\monitor | +-- @colyseus/core@0.14.28 -> .\packages\core | +-- @types/material-ui@0.21.8 | +-- @types/node-os-utils@1.2.0 | +-- @types/react-router-dom@4.3.5 | +-- @types/react@16.14.10 | +-- @types/superagent@3.8.7 | +-- css-loader@0.28.11 | +-- express@4.17.1 deduped | +-- extract-text-webpack-plugin@4.0.0-beta.0 | +-- file-loader@1.1.11 | +-- html-webpack-plugin@3.2.0 | +-- material-ui@0.20.2 | +-- node-os-utils@1.3.5 | +-- react-dom@16.14.0 | +-- react-json-edit@0.3.1 | +-- react-json-view@1.21.3 | +-- react-router-dom@4.3.1 | +-- react@16.14.0 | +-- style-loader@0.20.3 | +-- superagent@3.8.3 | +-- ts-loader@4.5.0 | +-- webpack-cli@3.3.12 | +-- webpack-dev-middleware@3.7.3 | +-- webpack-dev-server@3.11.2 |
-- webpack@4.46.0+-- @colyseus/redis-driver@0.14.22 -> .\packages\drivers\redis-driver
| +-- @colyseus/core@0.14.28 -> .\packages\core
|
-- redis@2.8.0 +-- @colyseus/redis-presence@0.14.20 -> .\packages\presence\redis-presence | +-- @colyseus/core@0.14.28 -> .\packages\core |
-- redis@2.8.0 deduped+-- @colyseus/tcp-transport@0.14.21 -> .\packages\transport\tcp-transport
|
-- @colyseus/core@0.14.28 -> .\packages\core +-- @colyseus/testing@0.14.22 -> .\packages\testing | +-- @colyseus/arena@0.14.24 -> .\packages\arena | +-- @colyseus/core@0.14.28 -> .\packages\core | +-- @colyseus/ws-transport@0.14.21 -> .\packages\transport\ws-transport | +-- colyseus.js@0.14.13 deduped |
-- httpie@2.0.0-next.13 deduped+-- @colyseus/uwebsockets-transport@0.14.27 -> .\packages\transport\uwebsockets-transport
| +-- @colyseus/core@0.14.28 -> .\packages\core
| +-- @colyseus/schema@1.0.25 deduped
|
-- uWebSockets.js@19.2.0 (git+ssh://git@github.com/uNetworking/uWebSockets.js.git#77b1761c5a23ac6a5c2adf2bd808be0ae6b5000a) +-- @colyseus/ws-transport@0.14.21 -> .\packages\transport\ws-transport | +-- @colyseus/core@0.14.28 -> .\packages\core | +-- @colyseus/schema@1.0.25 deduped | +-- @types/ws@7.4.6 |
-- ws@7.5.4 deduped+-- @lerna/batch-packages@3.16.0
+-- @lerna/filter-packages@4.0.0
+-- @lerna/project@4.0.0
+-- @rollup/plugin-commonjs@17.1.0
+-- @rollup/plugin-json@4.1.0
+-- @rollup/plugin-node-resolve@11.2.1
+-- @rollup/plugin-typescript@8.2.5
+-- @types/debug@0.0.31
+-- @types/express@4.17.12
+-- @types/fossil-delta@1.0.0
+-- @types/jest@26.0.24
+-- @types/koa@2.13.3
+-- @types/mocha@5.2.7
+-- @types/node@16.3.2
+-- @types/sinon@10.0.2
+-- all-contributors-cli@6.20.0
+-- assert@2.0.0
+-- benchmark@2.1.4
+-- bindings@1.5.0 extraneous
+-- c8@7.7.3
+-- colyseus.js@0.14.13
+-- colyseus@0.14.23 -> .\bundles\colyseus
| +-- @colyseus/core@0.14.28 -> .\packages\core
| +-- @colyseus/mongoose-driver@0.14.22 -> .\packages\drivers\mongoose-driver
| +-- @colyseus/redis-presence@0.14.20 -> .\packages\presence\redis-presence
|
-- @colyseus/ws-transport@0.14.21 -> .\packages\transport\ws-transport +-- cors@2.8.5 +-- express@4.17.1 +-- file-uri-to-path@1.0.0 extraneous +-- httpie@2.0.0-next.13 +-- jest@27.0.6 +-- koa@2.13.1 +-- lerna@4.0.0 +-- minimist@1.2.5 +-- mocha@5.2.0 +-- nan@2.14.2 extraneous +-- rimraf@2.7.1 +-- rollup-plugin-node-externals@2.2.0 +-- rollup@2.52.7 +-- sinon@11.1.1 +-- ts-jest@27.0.3 +-- ts-node-dev@1.1.8 +-- ts-node@7.0.1 +-- tslint@5.20.1
-- typescript@4.3.5The text was updated successfully, but these errors were encountered: