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

Init.sh failure in composite action #8263

Open
TGTGamer opened this issue Dec 12, 2023 · 9 comments
Open

Init.sh failure in composite action #8263

TGTGamer opened this issue Dec 12, 2023 · 9 comments
Labels

Comments

@TGTGamer
Copy link

Describe the bug

Cannot read properties of undefined (reading 'filter')
TypeError: Cannot read properties of undefined (reading 'filter')
    at GcpList.<anonymous> (/usr/local/lib/node_modules/@teambit/bvm/node_modules/@teambit/bvm.list/dist/gcp/gcp-list.js:60:51)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/@teambit/bvm/node_modules/@teambit/bvm.list/dist/gcp/gcp-list.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
./scripts/bit-init.sh: line 14: bit: command not found
Error: Process completed with exit code 127.

Expected Behavior

Not to error and to init bit

Screenshots, exceptions and logs

https://github.com/Eventiva/Eventiva/blob/6258fe527734b7ed37a4268a57898d6541f11947/.trunk/setup-ci/action.yaml#L1-L14

https://github.com/Eventiva/Eventiva/blob/6258fe527734b7ed37a4268a57898d6541f11947/scripts/bit-init.sh#L1-L14

@GiladShoham
Copy link
Member

This is a very old version of bit.
I'm not sure this specific version even exists.
Any reason you use this version?

@TGTGamer
Copy link
Author

TGTGamer commented Dec 12, 2023

Oh. Thanks hahahaha. No reason other than that's the one still in the sh on your website :) @GiladShoham lets see if that fixes it :)

@GiladShoham
Copy link
Member

It can also be a network issue. Like you need to set up a proxy server.
Where is it shown in our website?
@giteden fyi

@TGTGamer
Copy link
Author

It looks like your shell-scripts directory is still referencing it too :)

https://github.com/bit-tasks/shell-scripts/blob/55f029a4bd6978cde2cc3f58f43885f170d562f7/scripts/bit-init.sh#L1-L14

@AshanFernando
Copy link

@TGTGamer Can you check whether the PATH is correct depending on your build agent (following line)
export PATH="${HOME}/bin:${PATH}

If you want to use the latest Bit version in your CI (without fixing to a specific version), you can replace the following lines.

Replace

# arguments to the script
WSDIR="$1"
BIT_VERSION="0.2.8" # Leave empty for latest version

# install bvm and bit
npm i -g @teambit/bvm
bvm install ${BIT_VERSION} --use-system-node
export PATH="${HOME}/bin:${PATH}" # This step may change depending on your CI runner

# change to working directory before running bit install
cd ${WSDIR}

With

npx @teambit/bvm install

Note: You can also remove WSDIR if your Bit workspace is at the root of your project.

@TGTGamer
Copy link
Author

TGTGamer commented Dec 14, 2023

@TGTGamer Can you check whether the PATH is correct depending on your build agent (following line) export PATH="${HOME}/bin:${PATH}

If you want to use the latest Bit version in your CI (without fixing to a specific version), you can replace the following lines.

While I appreciate this response. Simply removing the set version fixed the issue.

The more important component is that this is set in the ZIP files which are referenced in the website, and therefore other users who download the file will experience the same issue (with the same easy fix).

To rectify this issue, the scripts found at https://github.com/bit-tasks need an update - which I might do later when I get home if nobody addresses it before I get to a device I can git pull on :)

@AshanFernando
Copy link

AshanFernando commented Dec 14, 2023

@TGTGamer Thanks!

Btw what do you mean by "Simply removing the set version fixed the issue"?
Is it to set BIT_VERSION=""

@TGTGamer
Copy link
Author

Is it to set BIT_VERSION=""

Yeah exactly this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants