Skip to content

Unable to use registerCompletionHandler #3350

Closed

Description

@mxiao-cll

I was trying to follow this guide: https://github.com/avajs/ava/blob/main/docs/08-common-pitfalls.md#timeouts-because-a-file-failed-to-exit

Here is my change: https://github.com/smartcontractkit/ea-framework-js/pull/309/files

But received the following error:

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/ea-framework-js/ea-framework-js/test/_force-exit.mjs not supported.
  Instead change the require of /home/runner/work/ea-framework-js/ea-framework-js/test/_force-exit.mjs to a dynamic import() which is available in all CommonJS modules.
  Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/ea-framework-js/ea-framework-js/test/_force-exit.mjs not supported.
  Instead change the require of /home/runner/work/ea-framework-js/ea-framework-js/test/_force-exit.mjs to a dynamic import() which is available in all CommonJS modules.
      at TracingChannel.traceSync (node:diagnostics_channel:315:14)
      at loadRequiredModule (file:///home/runner/work/ea-framework-js/ea-framework-js/node_modules/ava/lib/worker/base.js:198:[11](https://github.com/smartcontractkit/ea-framework-js/actions/runs/11921904641/job/33227039950?pr=309#step:5:12))
      at run (file:///home/runner/work/ea-framework-js/ea-framework-js/node_modules/ava/lib/worker/base.js:221:31)
      at async file:///home/runner/work/ea-framework-js/ea-framework-js/node_modules/ava/lib/worker/base.js:281:2

package.json: https://github.com/smartcontractkit/ea-framework-js/blob/main/package.json#L66
Invoke: https://github.com/smartcontractkit/ea-framework-js/blob/main/package.json#L66

Activity

  1. locked and limited conversation to collaborators on Nov 22, 2024
  2. converted this issue into a discussion #3354 on Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions