Skip to content

Uncaught (in promise) TypeError: Class constructor helperOperation cannot be invoked without 'new' #7

@ArunkumarRamanan

Description

@ArunkumarRamanan

Issue Description:
Uncaught (in promise) TypeError: Class constructor helperOperation cannot be invoked without 'new'

Error Details:

Uncaught (in promise) TypeError: Class constructor helperOperation cannot be invoked without 'new'
    at of.<anonymous> (operations_service.ts:237:23)
    at Generator.next (<anonymous>)
    at rewrite_sentence_operation.ts:64:3
    at new Promise (<anonymous>)
    at rf (rewrite_sentence_operation.ts:64:3)
    at of.startOperation (operations_service.ts:214:15)
    at ah.__onClickHelper (operation_controls.ts:88:38)
    at ah.<anonymous> (text_input_control.ts:122:20)
    at la.handleEvent (lit-html.js:6:7113)
(anonymous) @ operations_service.ts:237
(anonymous) @ rewrite_sentence_operation.ts:64
rf @ rewrite_sentence_operation.ts:64
startOperation @ operations_service.ts:214
(anonymous) @ operation_controls.ts:88
(anonymous) @ text_input_control.ts:122
handleEvent @ lit-html.js:6

Steps to Reproduce:

  1. Enable TerserPlugin optimization minimization in the webpack configuration.
  2. Use the "suggest rewrite" and "get prompt suggestions" features while the optimization is enabled.
  3. Observe the browser console for the error.

Expected Behavior:
The application should function correctly even with TerserPlugin optimization enabled and the "suggest rewrite" and "get prompt suggestions" features should not result in a TypeError.

Additional Information:

  • Version of PAIR-code/wordcraft used: (main branch)
  • Browser and version: (e.g., Chrome latest, Edge latest)
  • Operating System: (e.g., Windows 11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions