advanced-security / maven-dependency-submission-action

GitHub Action for submitting Maven dependencies
MIT License
48 stars 24 forks source link

Error when running v4.0.0 binaries #61

Closed coheigea closed 7 months ago

coheigea commented 10 months ago

If I try to run the binaries from https://github.com/advanced-security/maven-dependency-submission-action/releases/tag/v4.0.0 I get an error:

./maven-dependency-submission-action-macos
(node:63262) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `maven-dependency-submission-action-macos --trace-warnings ...` to show where the warning was created)
/snapshot/maven-dependency-submission-action/lib/src/executable/cli.js:10
import pkg from '../../package.json';
^^^^^^
SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:355:18)
    at wrapSafe (node:internal/modules/cjs/loader:1040:15)
    at Module._compile (node:internal/modules/cjs/loader:1076:27)
    at Module._compile (pkg/prelude/bootstrap.js:1933:32)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:834:12)
    at Function.runMain (pkg/prelude/bootstrap.js:1979:12)
    at node:internal/main/run_main_module:17:47

Reproduced on macos + linux

peter-murray commented 7 months ago

This should be resolved in 4.0.3 binaries.