Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ArunkumarRamanan opened this issue Aug 10, 2023 · 0 comments

Comments

@ArunkumarRamanan
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant