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

NX cloud issue with pnpm #29091

Open
1 of 4 tasks
el-davo opened this issue Nov 27, 2024 · 0 comments
Open
1 of 4 tasks

NX cloud issue with pnpm #29091

el-davo opened this issue Nov 27, 2024 · 0 comments

Comments

@el-davo
Copy link

el-davo commented Nov 27, 2024

Current Behavior

I have the following github actions file. If anyone can help me figure out why pnpm is failing or where the pnpm install --frozen-lockfile command is even coming from, as it is not in my github actions file

name: CI
on:
  push:
    branches:
      - main
  pull_request:

permissions:
  actions: read
  contents: read

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: pnpm/action-setup@v4
        with:
          version: 9

      - run: npx nx-cloud start-ci-run --distribute-on="3 linux-small-js" --stop-agents-after="build"
      - uses: actions/setup-node@v3
        with:
          node-version: 20
          cache: 'pnpm'
  
      - run: pnpm i
      - uses: nrwl/nx-set-shas@v4

      - run: npm run nx affected -t lint test build

Whenever I make a change I get this error on the nx cloud interface. Im not sure where this step is or why it fails. Even changing the package manager from pnpm to npm or yarn does not fix the issue as it always tries to run this pnpm install --frozen-lockfile command for some reason, if anyone can help I would be most grateful.

Image

Expected Behavior

CI runs should pass

GitHub Repo

No response

Steps to Reproduce

Nx Report

Node           : 19.9.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.14.2

nx                 : 20.1.2
@nx/js             : 20.1.2
@nx/jest           : 20.1.2
@nx/eslint         : 20.1.2
@nx/workspace      : 20.1.2
@nx/angular        : 20.1.2
@nx/devkit         : 20.1.2
@nx/eslint-plugin  : 20.1.2
@nx/playwright     : 20.1.2
@nx/vite           : 20.1.2
@nx/web            : 20.1.2
@nx/webpack        : 20.1.2
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/playwright/plugin
@nx/eslint/plugin

Failure Logs

Installing dependencies using pnpm
2      Running command: pnpm install --frozen-lockfile
3    
4     WARN  Ignoring not compatible lockfile at /home/workflows/workspace/pnpm-lock.yaml
5     ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent
6    
7    Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
8    node:child_process:965
9        throw err;
10       ^
11   
12   Error: Command failed: pnpm install --frozen-lockfile
13       at checkExecSyncError (node:child_process:890:11)
14       at execSync (node:child_process:962:15)
15       at Object.<anonymous> (/tmp/2235265147:9:3)
16       at Module._compile (node:internal/modules/cjs/loader:1376:14)
17       at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
18       at Module.load (node:internal/modules/cjs/loader:1207:32)
19       at Module._load (node:internal/modules/cjs/loader:1023:12)
20       at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
21       at node:internal/main/run_main_module:28:49 {
22     status: 1,
23     signal: null,
24     output: [ null, null, null ],
25     pid: 95,
26     stdout: null,
27     stderr: null
28   }
29   
30   Node.js v20.11.1

Package Manager Version

pnpm 9.14.2

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

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

No branches or pull requests

1 participant