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

Generated package.json no longer takes the correct versions of packages #12872

Closed
Tirke opened this issue Oct 28, 2022 · 6 comments
Closed

Generated package.json no longer takes the correct versions of packages #12872

Tirke opened this issue Oct 28, 2022 · 6 comments
Assignees
Labels
blocked: retry with latest Retry with latest release or head. outdated scope: core core nx functionality type: bug

Comments

@Tirke
Copy link

Tirke commented Oct 28, 2022

Current Behavior

After bumping to nx@15 we saw an important regression on our usage of the generatePackageJson flag. It is no longer using versions defined in the root package.json. Instead it's like it is picking the oldest version it can find in the lockfile.
For example we are using luxon@3.0.2 in the root package.json but we end up with "luxon": "1.28.0" in the generated package.json file. While looking in the lockfile I see that luxon@1.28.0 is a dependency of another package, that is also present in the package.json.

Expected Behavior

This is a regression. Before, nx generated package.json was using versions from the root package.json and not any random version that could be a dependency of a dependency.

Steps to Reproduce

Providing a minimal repro will take a bit of time on my side. May do it later.

Failure Logs

Environment

 >  NX   Report complete - copy this into the issue template

   Node : 16.10.0
   OS   : darwin arm64
   pnpm : 7.14.0

   nx : 15.0.4
   @nrwl/angular : Not Found
   @nrwl/cypress : 15.0.4
   @nrwl/detox : Not Found
   @nrwl/devkit : 15.0.4
   @nrwl/esbuild : Not Found
   @nrwl/eslint-plugin-nx : 15.0.4
   @nrwl/expo : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : 15.0.4
   @nrwl/js : 15.0.4
   @nrwl/linter : 15.0.4
   @nrwl/nest : 15.0.4
   @nrwl/next : 15.0.4
   @nrwl/node : 15.0.4
   @nrwl/nx-cloud : 15.0.0
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 15.0.4
   @nrwl/react-native : Not Found
   @nrwl/rollup : 15.0.4
   @nrwl/schematics : Not Found
   @nrwl/storybook : 15.0.4
   @nrwl/web : 15.0.4
   @nrwl/webpack : 15.0.4
   @nrwl/workspace : 15.0.4
   typescript : 4.8.4
   ---------------------------------------
   Local workspace plugins:
   ---------------------------------------
   Community plugins:
@JoA-MoS
Copy link
Contributor

JoA-MoS commented Oct 28, 2022

Duplicate of #12675, not sure if we want to reopen it.

@Tirke
Copy link
Author

Tirke commented Oct 30, 2022

@JoA-MoS thanks didn't see the issue but I am still wondering why it's closed when the issue is still existing?

@JoA-MoS
Copy link
Contributor

JoA-MoS commented Oct 30, 2022

@meeroslav
Copy link
Contributor

@Tirke, the issue gets closed when it's fixed. That still doesn't mean it's rolled out.

Can you try the latest version? If not fixed yet, then you'll have to wait until #12996 is included in the published version (most likely today)

@meeroslav meeroslav self-assigned this Nov 8, 2022
@meeroslav meeroslav added blocked: retry with latest Retry with latest release or head. scope: core core nx functionality and removed scope: plugins labels Nov 8, 2022
@Tirke
Copy link
Author

Tirke commented Nov 17, 2022

@meeroslav It's working well again although I now have the strangest of issues with some build randomly failing with no errors :( But it's unrelated to this issue. Closing.

@Tirke Tirke closed this as completed Nov 17, 2022
@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: retry with latest Retry with latest release or head. outdated scope: core core nx functionality type: bug
Projects
None yet
Development

No branches or pull requests

4 participants