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

[Bug] Runs started failing 2 days ago (15 Feb) wth "SyntaxError: Cannot use import statement outside a module" #209

Open
ITDevOpsAdmins opened this issue Feb 17, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ITDevOpsAdmins
Copy link

What happened?

Hi @austenstone

We have been making use of your copilot-usage-template to track our ROI for GitHub Copilot, but unfortunately it started failing a few days ago.

Image

I could not find an issue with our implementation or the template you created as nothing changed there, so presuming the change need to be made on this repo.

The error encountered was:

SyntaxError: Cannot use import statement outside a module

Not sure if it is perhaps related to #208, as the last reports were for 29 January 2025.

Thank you in advance

Relevant log output

Run austenstone/copilot-usage@main
  with:
    github-token: ***
    time-zone: PST
    organization: ***
    job-summary: true
    json: true
    csv: false
    xml: false
    artifact-name: copilot-usage
(node:1624) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/runner/work/_actions/austenstone/copilot-usage/main/dist/index.js:1
import run from "./run";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (node:internal/modules/cjs/loader:1378:20)
    at Module._compile (node:internal/modules/cjs/loader:1428:41)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49

Node.js v20.18.0

Contact Details

[email protected]

@ITDevOpsAdmins ITDevOpsAdmins added the bug Something isn't working label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants