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

false NX check errors from cached data #95

Open
dblatcher opened this issue Apr 19, 2023 · 0 comments
Open

false NX check errors from cached data #95

dblatcher opened this issue Apr 19, 2023 · 0 comments

Comments

@dblatcher
Copy link
Contributor

I had a couple of issues with NX reporting false build errors - Recently, this came up when I had created and built a new library("launch-wizard"), then changed my mind and reverted the change. Although the library was removed from the source code, there was still a reference to it in ./node_modules/.cache/nx.

As a result, the 'build all' commands still looked for the commands for the deleted library and threw a build error. I was able to fix this with:
rm -rf ./node_modules/.cache/nx

Should add some notes to the readme about this kind of error and how to fix - unless this behaviour is fixed on an upgrade we need to apply.

example error from a deleted (but cached) project:

31132:newsletters-nx david_blatcher$  git push --set-upstream origin dblatcher/launch-draft-to-newsletter

 >  NX   Affected criteria defaulted to --base=main --head=HEAD


    ✔  nx run newsletters-data-client:lint  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-data-client:test  [existing outputs match the cache, left as is]
    ✔  nx run state-machine:lint  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-data-client:build  [existing outputs match the cache, left as is]
    ✔  nx run newsletter-workflow:lint  [existing outputs match the cache, left as is]
    ✔  nx run state-machine:test  [existing outputs match the cache, left as is]
    ✔  nx run state-machine:build  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-api:lint  [existing outputs match the cache, left as is]
    ✔  nx run newsletter-workflow:test  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-ui:lint  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-api:test  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-ui:test  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-api:build  [existing outputs match the cache, left as is]
    ✔  nx run newsletters-ui:build:production  [existing outputs match the cache, left as is]

    ✖  nx run launch-wizard:test
       >  NX   Can't find a root directory while resolving a config file path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant