Possible circular import #9

Closed
opened 2020-05-21 02:13:10 -04:00 by Bsian · 8 comments
Bsian commented 2020-05-21 02:13:10 -04:00 (Migrated from gitlab.libraryofcode.org)

BUG REPORT

Brief Description: Running the bot from dev causes a class extends undefined TypeError. This happens for both Events and Commands.

Priority: (1-5, 5 being the most urgent) 5

Notes:

In each case, the following stack trace is given:

class CommandHandler extends class_1.Event {
                                     ^

TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (communityrelations/build/events/CommandHandler.js:5:38)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (communityrelations/build/events/index.js:3:24)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (communityrelations/build/class/Client.js:18:33)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
# BUG REPORT **Brief Description:** Running the bot from dev causes a class extends undefined TypeError. This happens for both Events and Commands. **Priority:** (1-5, 5 being the most urgent) 5 **Notes:** In each case, the following stack trace is given: ```js class CommandHandler extends class_1.Event { ^ TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (communityrelations/build/events/CommandHandler.js:5:38) at Module._compile (internal/modules/cjs/loader.js:1176:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10) at Module.load (internal/modules/cjs/loader.js:1040:32) at Function.Module._load (internal/modules/cjs/loader.js:929:14) at Module.require (internal/modules/cjs/loader.js:1080:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.<anonymous> (communityrelations/build/events/index.js:3:24) at Module._compile (internal/modules/cjs/loader.js:1176:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10) at Module.load (internal/modules/cjs/loader.js:1040:32) at Function.Module._load (internal/modules/cjs/loader.js:929:14) at Module.require (internal/modules/cjs/loader.js:1080:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.<anonymous> (communityrelations/build/class/Client.js:18:33) at Module._compile (internal/modules/cjs/loader.js:1176:30) ```
Bsian commented 2020-05-21 02:13:27 -04:00 (Migrated from gitlab.libraryofcode.org)

changed the description

changed the description
Bsian commented 2020-05-21 02:14:06 -04:00 (Migrated from gitlab.libraryofcode.org)

changed the description

changed the description
Bsian commented 2020-05-21 02:28:36 -04:00 (Migrated from gitlab.libraryofcode.org)

Apparently moving to ES6 modules solves this issue but have not tested, since ESM currently does not support optional chaining

Apparently moving to ES6 modules solves this issue but have not tested, since ESM currently does not support optional chaining
Bsian commented 2020-05-21 04:11:55 -04:00 (Migrated from gitlab.libraryofcode.org)

Also seems like requiring the event/command files at runtime also fixes the issue. Fix will come soon

Also seems like requiring the event/command files at runtime also fixes the issue. Fix will come soon
Bsian commented 2020-05-21 04:26:53 -04:00 (Migrated from gitlab.libraryofcode.org)

mentioned in commit 13b915ab5a

mentioned in commit 13b915ab5a07a422a13513192977b146254495a1
Bsian commented 2020-05-21 04:34:07 -04:00 (Migrated from gitlab.libraryofcode.org)

mentioned in commit 64b97ff9ba

mentioned in commit 64b97ff9ba56c22c552c0aec0dc818bd7eb24c2d
Bsian commented 2020-05-22 01:53:24 -04:00 (Migrated from gitlab.libraryofcode.org)

closed via commit 13b915ab5a

closed via commit 13b915ab5a07a422a13513192977b146254495a1
Bsian commented 2020-05-22 01:53:25 -04:00 (Migrated from gitlab.libraryofcode.org)

closed via commit 64b97ff9ba

closed via commit 64b97ff9ba56c22c552c0aec0dc818bd7eb24c2d
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: engineering/community-relations#9
There is no content yet.