nrwl / nx

Smart Monorepos Β· Fast CI
https://nx.dev
MIT License
23.28k stars 2.32k forks source link

Nx restores incorrect cache #10431

Closed Matwog closed 2 years ago

Matwog commented 2 years ago

First of all, thanks a ton to the authors for the great work with Nx. ❀️ πŸš€ We, in our codebase, recently migrated away from yarn and lerna to using pnpm and would like to integrate Nx and observed few blockers.

Current Behavior

Nx in a monorepo using PNPM workspaces does not restore the correct cache.

Expected Behavior

Nx restores the correct cache.

Steps to Reproduce

Screenshot 2022-05-23 at 13 38 47

Additional Info: Nx was added to the repo by running npx add-nx-to-monorepo.

This issue may not be prioritized if details are not provided to help us reproduce the issue.

Failure Logs

The above screenshot may be useful.

Environment

 Node : 16.13.2
   OS   : darwin x64
   pnpm : 7.0.1

   nx : 14.1.7
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : Not Found
   @nrwl/eslint-plugin-nx : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : Not Found
   @nrwl/js : Not Found
   @nrwl/linter : Not Found
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/workspace : Not Found
   typescript : Not Found
   rxjs : 6.6.7
   ---------------------------------------
   Community plugins:
AgentEnder commented 2 years ago

Hey @Matwog! I think I see what is going on. Here are the two elements at play:

Here is the docs on how to specify non-standard outputs: https://nx.dev/configuration/packagejson#project-configuration

Nx supports build artifacts in the following locations by default:

Matwog commented 2 years ago

@AgentEnder Thanks for quick response.

Yes specifying non-standard outputs makes sense. I tried it now in the minimal repo and I can see that Nx works and is able to correctly restore the cache. πŸ‘ Will try to integrate the same way for our product.

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.