nx icon indicating copy to clipboard operation
nx copied to clipboard

@nrwl/react:library and @nrwl/react:appication generators update package versions in root package.json

Open sarahquigley opened this issue 1 year ago • 1 comments

Current Behavior

We are using @nrwl/react:library and @nrwl/react:appication generators in our nx monorepo. When we run these generators, a bunch of package versions in our monorepo root package.json are updated unexpectedly. If kept, these changes break our project build. We tried adding skipPackageJson but this had no effect.

This image shows an example of the changes we're seeing in package.json. Screenshot 2023-06-15 at 12 27 45 PM

Expected Behavior

When running these generators, either:

  • package versions in root package.json should not be changed. OR
  • there should be an option to suppress updates to package versions in root package.json

GitHub Repo

No response

Steps to Reproduce

  1. Run @nrwl/react:library and @nrwl/react:appication generators and check package.json

Nx Report

>  NX   Report complete - copy this into the issue template

   Node : 18.13.0
   OS   : darwin arm64
   yarn : 1.22.19
   
   nx : 15.3.0
   @nrwl/angular : Not Found
   @nrwl/cypress : 15.3.0
   @nrwl/detox : Not Found
   @nrwl/devkit : 15.3.0
   @nrwl/esbuild : 15.3.0
   @nrwl/eslint-plugin-nx : 15.3.0
   @nrwl/expo : Not Found
   @nrwl/express : 15.3.0
   @nrwl/jest : 15.3.0
   @nrwl/js : 15.3.0
   @nrwl/linter : 15.3.0
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : 15.3.0
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : 15.3.0
   @nrwl/react : 15.3.0
   @nrwl/react-native : Not Found
   @nrwl/rollup : 15.3.0
   @nrwl/schematics : Not Found
   @nrwl/storybook : 15.3.0
   @nrwl/web : 15.3.0
   @nrwl/webpack : 15.3.0
   @nrwl/workspace : 15.3.0
   typescript : 4.9.5
   ---------------------------------------
   Local workspace plugins:
         @jane/tools/workspace
   ---------------------------------------
   Community plugins:

Failure Logs

No response

Operating System

  • [X] macOS
  • [ ] Linux
  • [ ] Windows
  • [ ] Other (Please specify)

Additional Information

No response

sarahquigley avatar Jun 15 '23 19:06 sarahquigley

i think this is intended. pass in the flag --skipPackageJson=true skipPackageJson when generating library and application, it will not update deps in package.json

xiongemi avatar Jun 16 '23 01:06 xiongemi

closing this issue for now.

xiongemi avatar Jun 20 '23 01:06 xiongemi

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.

github-actions[bot] avatar Jul 21 '23 00:07 github-actions[bot]