-
Notifications
You must be signed in to change notification settings - Fork 3
Unable to run within GitHub action #23
Copy link
Copy link
Open
Description
I have the following in my dangerjs.js
import { message, fail, warn, danger } from "danger";
// const { exec } = require("child_process");
import commitlint from "danger-plugin-conventional-commitlint";
import configConventional from "@commitlint/config-conventional";
(async function dangerReport() {
const commitlintConfig = {
severity: "warn",
};
await commitlint(configConventional.rules, commitlintConfig);
})();But when run in a github action receive:
Unable to evaluate the Dangerfile
./dangerfile.js:4
import commitlint from "danger-plugin-conventional-commitlint";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:360:[18](https://github.com/app/actions/runs/3510160765/jobs/5879744816#step:6:19))
at wrapSafe (node:internal/modules/cjs/loader:1084:15)
at Module._compile (node:internal/modules/cjs/loader:11[19](https://github.com/app/actions/runs/3510160765/jobs/5879744816#step:6:20):27)
...Is there a working example I can reference?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels