Skip to content

Commit 0de5687

Browse files
authored
information about leaving console.log in compiled js
1 parent 182198c commit 0de5687

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

docs/debugging/image-1.png

342 KB
Loading

docs/debugging/image.png

135 KB
Loading

docs/debugging/troubleshooting.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
If on server start you get Cannot read properties of undefined (reading 'id') its highly possible that you put something what was tried to be loaded by autoload and you break recommended structure
66

7-
87
For instance if you put smth into main/database/common/smth-common.ts what does not have decorator related to DB.
9-
Put your services and helpers outside of structure ie. main/helpers
8+
Put your services and helpers outside of structure ie. main/helpers
9+
10+
## console log source of rpgjs
11+
12+
In command line we can see some error on server start.
13+
![Alt text](image.png)
14+
15+
In this example we have Cannot read properties of undefined (reading 'id'), and stack trace says its in [@rpgjs]/server/src/Scenes/Map.ts:226:38
16+
17+
We cannot leave console.log in Map.ts, bacouse we would have to rebuild library. But we can do this in complied js in same place
18+
[@rpgjs]/server/lib/Scenes/Map.ts
19+
20+
![Alt text](image-1.png)

0 commit comments

Comments
 (0)