Closed gemboran closed 3 weeks ago
The plan to solve the bug involves modifying the CI/CD pipeline configuration file to ensure that pnpm
is installed before attempting to run the build process. The error message indicates that the pnpm
command is not found, which suggests that pnpm
is not installed in the CI environment. By adding a step to install pnpm
, we can ensure that the build process has all the necessary tools to execute successfully.
The bug is caused by the absence of pnpm
in the CI environment. The error message /home/runner/work/_temp/db514816-03a0-4a1b-9e7c-5fd51856d101.sh: line 2: pnpm: command not found
indicates that the pnpm
command is not recognized because it is not installed. The CI configuration file .github/workflows/ci.yml
does not include a step to install pnpm
, leading to the failure of the build process.
To resolve this issue, we need to update the .github/workflows/ci.yml
file to include a step for installing pnpm
. Here is the updated configuration:
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
pnpm
globally using npm
.pnpm
.pnpm
.By adding these steps, we ensure that pnpm
is installed in the CI environment before the build step is executed, which should resolve the issue.
To replicate the bug, follow these steps:
pnpm
for package management..github/workflows/ci.yml
file with a CI/CD pipeline configuration that does not include a step to install pnpm
.pnpm
is not found.Ticket title: CI CD error when running pnpm build
Ticket Description:
/home/runner/work/_temp/db514816-03a0-4a1b-9e7c-5fd51856d101.sh: line 2: pnpm: command not found
Error: Process completed with exit code 127.
By following the proposed solution and updating the .github/workflows/ci.yml
file to include a step for installing pnpm
, we can resolve the issue and ensure that the CI/CD pipeline runs successfully.
Click here to create a Pull Request with the proposed solution
Files used for this task:
Done, I am bump node version to v20 and install pnpm v9.5.0