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] node: not found for postscript #1088

Closed
hckhanh opened this issue Oct 1, 2023 · 14 comments
Closed

[bug] node: not found for postscript #1088

hckhanh opened this issue Oct 1, 2023 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@hckhanh
Copy link

hckhanh commented Oct 1, 2023

Describe the bug

I get this bug when I run the ci command on GitHub Actions

Running targets
  ▪▪▪▪ installing node 18.18.0
  ▪▪▪▪ installing pnpm 8.8.0
  ▪▪▪▪ pnpm install
  /home/github/.proto/tools/pnpm/8.8.0/shims/pnpm install --frozen-lockfile (in workspace)
  Lockfile is up to date, resolution step is skipped
  Progress: resolved 1, reused 0, downloaded 0, added 0
  Packages: +1385
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Progress: resolved 1385, reused 0, downloaded 8, added 8
  Progress: resolved 1385, reused 0, downloaded [25](https://github.com/tenxtenx/saladin-admin/actions/runs/6368112401/job/17287252021#step:4:29), added 24
  Progress: resolved 1385, reused 0, downloaded 72, added 72
  Progress: resolved 1385, reused 0, downloaded 119, added 119
  Progress: resolved 1385, reused 0, downloaded 159, added 159
  Progress: resolved 1385, reused 0, downloaded 213, added 213
  Progress: resolved 1385, reused 0, downloaded 214, added 213
  Progress: resolved 1385, reused 0, downloaded 235, added 234
  Progress: resolved 1385, reused 0, downloaded 256, added 255
  Progress: resolved 1385, reused 0, downloaded [28](https://github.com/tenxtenx/saladin-admin/actions/runs/6368112401/job/17287252021#step:4:32)9, added 289
  Progress: resolved 1385, reused 0, downloaded 349, added 347
  Progress: resolved 1385, reused 0, downloaded 400, added 400
  Progress: resolved 1385, reused 0, downloaded 465, added 465
  Progress: resolved 1385, reused 0, downloaded 570, added 562
  Progress: resolved 1385, reused 0, downloaded 770, added 769
  Progress: resolved 1385, reused 0, downloaded 837, added 836
  Progress: resolved 1385, reused 0, downloaded 897, added 896
  Progress: resolved 1385, reused 0, downloaded 1046, added 1043
  Progress: resolved 1385, reused 0, downloaded 11[29](https://github.com/tenxtenx/saladin-admin/actions/runs/6368112401/job/17287252021#step:4:33), added 1129
  Progress: resolved 1385, reused 0, downloaded 1189, added 1187
  Progress: resolved 1385, reused 0, downloaded 1[31](https://github.com/tenxtenx/saladin-admin/actions/runs/6368112401/job/17287252021#step:4:35)4, added 1314
  Progress: resolved 1[38](https://github.com/tenxtenx/saladin-admin/actions/runs/6368112401/job/17287252021#step:4:42)5, reused 0, downloaded 1380, added 1380
  Progress: resolved 1385, reused 0, downloaded 1385, added 1385, done
  .../node_modules/@vime/react postinstall$ node ./.scripts/validate.cjs
  .../node_modules/@vime/react postinstall: sh: 1: node: not found
   ELIFECYCLE  Command failed.
  .../node_modules/@sentry/cli install$ node ./scripts/install.js
  .../node_modules/@sentry/cli install: sh: 1: node: not found
  [ERROR 2023-10-01 11:[47](https://github.com/tenxtenx/saladin-admin/actions/runs/6368112401/job/17287252021#step:4:51):[52](https://github.com/tenxtenx/saladin-admin/actions/runs/6368112401/job/17287252021#step:4:56)] log:ci  Encountered a critical error, aborting the action pipeline  log.target="moon:action-pipeline:batch:2" log.module_path="moon_action_pipeline::pipeline" log.file="crates/core/action-pipeline/src/pipeline.rs" log.line=216
  Error: process::failed
  
    × Process ~/.proto/tools/pnpm/8.8.0/shims/pnpm failed with a 1 exit code.
  
  Error: Process completed with exit code 1.
@hckhanh hckhanh added the bug Something isn't working label Oct 1, 2023
@hckhanh hckhanh changed the title [bug] node: not found for sentry/cli postscript [bug] node: not found for postscript Oct 1, 2023
@milesj
Copy link
Collaborator

milesj commented Oct 1, 2023

@hckhanh Is node available globally? If scripts try and run globals, moon can't do anything about that, so they must exist on PATH.

@hckhanh
Copy link
Author

hckhanh commented Oct 1, 2023

Hi @milesj
Node was installed globally. But when I try to use moon process, it throws this error

@milesj
Copy link
Collaborator

milesj commented Oct 1, 2023

@hckhanh Interesting, how's it installed, with setup-node action?

@hckhanh
Copy link
Author

hckhanh commented Oct 1, 2023

It is installed manually by myself, since i am using self-hosted runner.

@milesj
Copy link
Collaborator

milesj commented Oct 1, 2023

Let me dig into it.

@hckhanh
Copy link
Author

hckhanh commented Oct 1, 2023

@milesj, I figured out the moonrepo/setup-moon-action@v1 did not work correctly on self-hosted runner. It installed proto but not moon, so when I tried to use this action, it showed me: /home/github/actions-runner/_work/_temp/dc7b7688-7120-4b85-8382-909398671ed3.sh: line 1: moon: command not found

@hckhanh
Copy link
Author

hckhanh commented Oct 1, 2023

When I inspected further, I only saw moon bin in $HOME/.moon/bin/, not $HOME/.proto/bin/ like the log of the console said. I had to workaround by create symlink from $HOME/.moon/bin/moon to /usr/local/bin to make it run smoothly.

@milesj
Copy link
Collaborator

milesj commented Oct 1, 2023

@hckhanh Thanks for pointing that out, will look into also.

On a side note, I'm actually working on a better action here: https://github.com/moonrepo/setup-toolchain/

@milesj
Copy link
Collaborator

milesj commented Oct 1, 2023

I've created some test cases here: #1089 but am unable to reproduce this. Even locally the global seems to always be available. Can you paste the PATH being used?

@hckhanh
Copy link
Author

hckhanh commented Oct 2, 2023

@hckhanh Thanks for pointing that out, will look into also.

On a side note, I'm actually working on a better action here: https://github.com/moonrepo/setup-toolchain/

I already switched to this new one. It's really much more better than the previous one.

I am using /usr/local/bin/moon as a workaround for self-hosted runner. But I don't see any problem with the old action on GitHub-cloud runner.

@hckhanh
Copy link
Author

hckhanh commented Oct 2, 2023

For the moonrepo/setup-toolchain@v0, the post process is pretty slow. Sometime, it can reach 2 minutes, almost it will be 30s

@milesj
Copy link
Collaborator

milesj commented Oct 2, 2023

@hckhanh Do you have an example run I can look at? Or is it simply the upload archive part?

Also, can you try 1.14.4, curious if it helped with the original issue.

@milesj
Copy link
Collaborator

milesj commented Oct 5, 2023

@hckhanh Is this still an issue?

@milesj
Copy link
Collaborator

milesj commented Oct 30, 2023

Gonna close as this should be resolved by the new action.

@milesj milesj closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants