Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Affected matrix generation fail with: Cannot read properties of undefined (reading 'endsWith') #53

@tamascsaba

Description

@tamascsaba

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Affected matrix generation fail with:

>  NX   Cannot read properties of undefined (reading 'endsWith')
Run nrwl/nx-set-shas@v2
Run node $GITHUB_ACTION_PATH/dist/index.js *** main false push . 

(node:2254) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

(Use `node --trace-deprecation ...` to show where the warning was created)
Run echo "Base SHA"
Base SHA
e152b7b283726560a0f3bfe95c8c32fb4be4fda3

Head SHA
9c0d010a0cc9b9b22b4f66ecad983e8dc1b340fb

Run # Built-in Github action conditionals are not supported in composite steps so have to check manually in bash
NX_BASE and NX_HEAD environment variables have been set for the current Job
Run actions/github-script@v6
🐞 parsed args: {
  "skipNxCache": false
}
⚙️ Generating affected matrix for build
  🐞 Calculating affected for "test" target
  
   >  NX   Cannot read properties of undefined (reading 'endsWith')

Minimal reproduction of the problem with instructions

I had to add NX_WORKSPACE_ROOT_PATH, because workingDirectory is not working.
My configuration looks like:

  setup:
    runs-on: ubuntu-latest
    name: Affected Matrix
    env:
      NX_VERBOSE_LOGGING: true
      NX_WORKSPACE_ROOT_PATH: ${{ github.workspace }}/nx-root/
    outputs:
      hasChanges: ${{ steps.affected.outputs.hasChanges }}
      matrix: ${{ steps.affected.outputs.matrix }}
    steps:
      - name: Calculate affected projects
        uses: e-square-io/nx-affected-matrix@v2
        id: affected
        with:
          debug: true
          targets: 'test,build'
          maxDistribution: 3
          args: ''

I am using nx 14.4.2 with version 2 projects format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions