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 file missing dependencies since 19.1.2 #26410

Closed
1 of 4 tasks
PodStuart opened this issue Jun 6, 2024 · 5 comments · Fixed by #26457
Closed
1 of 4 tasks

Generated package.json file missing dependencies since 19.1.2 #26410

PodStuart opened this issue Jun 6, 2024 · 5 comments · Fixed by #26457

Comments

@PodStuart
Copy link

Current Behavior

Versions 19.1.2 and 19.2.0 appear to have introduced some regression whereby the generated package.json file is missing some dependencies.

Expected Behavior

Generated package.json file is not missing dependencies.

GitHub Repo

No response

Steps to Reproduce

Really quite difficult to create a minimal reproduction since this is happening in a monorepo with 20 apps and dozens of dependencies.

Nx Report

Node   : 20.14.0
OS     : darwin-arm64
npm    : 10.7.0

nx                 : 19.2.0
@nx/js             : 19.2.0
@nx/jest           : 19.2.0
@nx/linter         : 19.2.0
@nx/eslint         : 19.2.0
@nx/workspace      : 19.2.0
@nx/cypress        : 19.2.0
@nx/devkit         : 19.2.0
@nx/eslint-plugin  : 19.2.0
@nx/nest           : 19.2.0
@nx/next           : 19.2.0
@nx/node           : 19.2.0
@nx/react          : 19.2.0
@nx/storybook      : 19.2.0
@nrwl/tao          : 19.2.0
@nx/web            : 19.2.0
@nx/webpack        : 19.2.0
typescript         : 5.4.3
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
---------------------------------------
Community plugins:
@nx-go/nx-go                 : 3.1.0
@trumbitta/nx-plugin-openapi : 1.12.1

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Configuration from one of our build targets.

"build": { "executor": "@nx/webpack:webpack", "outputs": ["{options.outputPath}"], "options": { "target": "node", "compiler": "tsc", "outputPath": "dist/apps/commercial/destination/site-admin-api", "main": "apps/commercial/destination/site-admin-api/src/main.ts", "tsConfig": "apps/commercial/destination/site-admin-api/tsconfig.app.json", "tsPlugins": ["@nestjs/swagger/plugin"], "webpackConfig": "apps/commercial/destination/site-admin-api/webpack.config.js", "generatePackageJson": true },

@Nick-Lucas
Copy link

Nick-Lucas commented Jun 7, 2024

Also seeing this here on 19.2.0 after upgrading from 19.0.0

tRPC is missing from our API, which is weird since it's imported in many places and never conditionally - also sort of the most important dependency for our API!

 NX   Report complete - copy this into the issue template

Node   : 20.12.2
OS     : linux-x64
pnpm   : 8.15.7

nx                 : 19.2.0
@nx/js             : 19.2.0
@nx/jest           : 19.2.0
@nx/linter         : 19.2.0
@nx/eslint         : 19.2.0
@nx/workspace      : 19.2.0
@nx/cypress        : 19.2.0
@nx/devkit         : 19.2.0
@nx/esbuild        : 19.2.0
@nx/eslint-plugin  : 19.2.0
@nx/nest           : 19.2.0
@nx/node           : 19.2.0
@nx/plugin         : 19.2.0
@nx/react          : 19.2.0
@nrwl/tao          : 19.2.0
@nx/web            : 19.2.0
@nx/webpack        : 19.2.0
typescript         : 5.4.4

@realityfilter
Copy link

We see the same problem. @trpc/server and mimetext are missing. As a temporary workaround we are specifying these dependencies in the app's package.json.

@FrozenPandaz
Copy link
Collaborator

@Nick-Lucas could you see what version of @trpc/server you are using?

I think this repo showcases the same @trpc/server depenency missing but I'm not sure.

@meeroslav can you take a look please?

@Nick-Lucas
Copy link

@Nick-Lucas could you see what version of @trpc/server you are using?

I think this repo showcases the same @trpc/server depenency missing but I'm not sure.

@meeroslav can you take a look please?

11.0.0-rc.382

Now I think of it here's a diff of everything which changed between 19.0.0 and 19.2.0

image

the react and react-query stuff also appears to have been correctly there originally since we use the @trpc/react-query package for some TS type imports in the API and it would all get dragged in if Nx isn't filtering import type {} from out.

Copy link

github-actions bot commented Jul 8, 2024

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 Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants