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

Nx v15 support #61

Closed
robinpellegrims opened this issue Nov 11, 2022 · 2 comments · Fixed by #64
Closed

Nx v15 support #61

robinpellegrims opened this issue Nov 11, 2022 · 2 comments · Fixed by #64

Comments

@robinpellegrims
Copy link
Contributor

I'm submitting a...


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

Current behavior

After updating my repository to nx v15, the nx-distributed-task action throws the following error for test, lint, e2e targets (seems to work for build):

TypeError: Cannot read properties of undefined (reading 'some')
    at exports.shouldRunWithDeps (/home/runner/work/_actions/e-square-io/nx-distributed-task/v2/main.js:29:805582)
Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'some')
    at exports.getInputs (/home/runner/work/_actions/e-square-io/nx-distributed-task/v2/main.js:29:793123)
    at exports.default (/home/runner/work/_actions/e-square-io/nx-distributed-task/v2/main.js:29:6520556)
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13356:16), <anonymous>:18:7)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13357:12)
    at main (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13452:26)
    at Module.858 (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13429:1)
    at __webpack_require__ (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:24:31)
    at startup (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:43:19)
    at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:[49](https://github.com/robinpellegrims/pellegrims/actions/runs/3446855679/jobs/5752274744#step:4:51):18

My nx.json was updated by the migration scripts and the targetDefaults property now looks like this:

  "targetDefaults": {
    "build": {
      "dependsOn": ["^build"],
      "inputs": ["production", "^production"]
    },
    "e2e": {
      "inputs": ["default", "^production"]
    },
    "test": {
      "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
    },
    "lint": {
      "inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
    }
  },

Expected behavior

The action should work like for nx v14 repositories

Minimal reproduction of the problem with instructions

Update a nx v14 repository to v15

Environment


- Nx version: 15.0.13 
- Node version: 14  
@ronnetzer
Copy link
Member

fixed by #64

@ronnetzer ronnetzer linked a pull request Nov 22, 2022 that will close this issue
3 tasks
@robinpellegrims
Copy link
Contributor Author

Thanks, this solves my problem!

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

Successfully merging a pull request may close this issue.

2 participants