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

Absolute path to access index.js #22

Merged
merged 3 commits into from
Jul 22, 2024
Merged

Absolute path to access index.js #22

merged 3 commits into from
Jul 22, 2024

Conversation

ssomayyajula
Copy link
Contributor

@ssomayyajula ssomayyajula commented Jul 15, 2024

@josecorella is hitting the following error from using v1.7.1 within an MPL workflow

2024-07-15T16:37:48.1742150Z ##[group]Run node dist/index.js
2024-07-15T16:37:48.1742380Z �[36;1mnode dist/index.js�[0m
2024-07-15T16:37:48.1774930Z shell: /bin/bash --noprofile --norc -e -o pipefail {0}
2024-07-15T16:37:48.1775170Z env:
2024-07-15T16:37:48.1775300Z   DOTNET_CLI_TELEMETRY_OPTOUT: 1
2024-07-15T16:37:48.1775490Z   DOTNET_NOLOGO: 1
2024-07-15T16:37:48.1775640Z   DOTNET_ROOT: /var/root/.dotnet
2024-07-15T16:37:48.1775830Z   INPUT_DAFNY-VERSION: 4.2.0
2024-07-15T16:37:48.1775990Z ##[endgroup]
2024-07-15T16:37:48.2328720Z node:internal/modules/cjs/loader:1031
2024-07-15T16:37:48.2329140Z   throw err;
2024-07-15T16:37:48.2329310Z   ^
2024-07-15T16:37:48.2329410Z 
2024-07-15T16:37:48.2330660Z Error: Cannot find module '/private/tmp/codebuild/output/src962/src/a951722d_5a9e_4668_ab99_68c59d804d36/actions-runner/_work/aws-cryptographic-material-providers-library/aws-cryptographic-material-providers-library/dist/index.js'
2024-07-15T16:37:48.2331720Z     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
2024-07-15T16:37:48.2332170Z     at Function.Module._load (node:internal/modules/cjs/loader:873:27)
2024-07-15T16:37:48.2333260Z     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
2024-07-15T16:37:48.2333710Z     at node:internal/main/run_main_module:22:47 {
2024-07-15T16:37:48.2333990Z   code: 'MODULE_NOT_FOUND',
2024-07-15T16:37:48.2334180Z   requireStack: []
2024-07-15T16:37:48.2334350Z }
2024-07-15T16:37:48.2340470Z ##[error]Process completed with exit code 1.

So the fix should be to change the invocation to node $GITHUB_ACTION_PATH/dist/index.js following this

@ssomayyajula ssomayyajula marked this pull request as ready for review July 15, 2024 17:46
Copy link
Contributor

@josecorella josecorella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if what we are trying to do is to run node on the index file of this repo, then it should work. It begs the question, how did this work before?

@ssomayyajula
Copy link
Contributor Author

Previously, this action was only a Javascript action, but I turned it into a composite action to install the right version of .NET for Apple Silicon runners, etc. It looks like my fix here is correct because someone ran into the same issue and applied the same fix so you can go ahead and approve.

@stefan-aws stefan-aws merged commit b215b15 into main Jul 22, 2024
21 checks passed
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

Successfully merging this pull request may close these issues.

3 participants