nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.62k stars 2.36k forks source link

NPE on task runner #26506

Closed gkamperis closed 1 week ago

gkamperis commented 5 months ago

Current Behavior

I am hitting this bug throwing a NPE with a MFE setup and buildable libs

This line accesses targetConfiguration with no truthy check https://github.com/nrwl/nx/blob/8351cb11f30d14fc508320da3107a138c92fb289/packages/nx/src/tasks-runner/utils.ts#L204

however next line https://github.com/nrwl/nx/blob/8351cb11f30d14fc508320da3107a138c92fb289/packages/nx/src/tasks-runner/utils.ts#L205 shows this can be possibly undefined

and even further down

https://github.com/nrwl/nx/blob/8351cb11f30d14fc508320da3107a138c92fb289/packages/nx/src/tasks-runner/utils.ts#L209C2-L209C38

Expected Behavior

To not throw

GitHub Repo

No response

Steps to Reproduce

Set up MFE with dev remotes and buildable libs. Try building the remote on its own

Nx Report

N/A

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

No response

gkamperis commented 4 months ago

is this not as easy as adding a ?. ?

xiongemi commented 1 week ago

it is fixed in pr https://github.com/nrwl/nx/pull/26721/. it is included in https://github.com/nrwl/nx/releases/tag/19.5.0