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

Broken generated lock file with [email protected] #21180

Closed
1 of 4 tasks
artursudnik opened this issue Jan 17, 2024 · 1 comment · Fixed by #23474
Closed
1 of 4 tasks

Broken generated lock file with [email protected] #21180

artursudnik opened this issue Jan 17, 2024 · 1 comment · Fixed by #23474
Assignees
Labels

Comments

@artursudnik
Copy link

artursudnik commented Jan 17, 2024

Current Behavior

When having "generatePackageJson": true and TypeORM v0.3.18 (or higher) in the project, the generated package-lock.json file is broken. As a result, when trying to install production deps, I am getting the following error:

npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file

Expected Behavior

Installation of the production dependencies with npm ci without errors.

GitHub Repo

https://github.com/artursudnik/nx-missing-deps-in-build

Steps to Reproduce

  1. checkout the code
  2. cd nx-missing-deps-in-build
  3. install deps: npm ci
  4. build the code: npx nx run backend:build
  5. install dependencies using generated package.json and package-lock.json: cd dist/apps/backend && npm ci

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 20.11.0
   OS     : darwin-arm64
   npm    : 10.2.4

   nx                 : 17.2.8
   @nx/js             : 17.2.8
   @nx/jest           : 17.2.8
   @nx/linter         : 17.2.8
   @nx/eslint         : 17.2.8
   @nx/workspace      : 17.2.8
   @nx/devkit         : 17.2.8
   @nx/eslint-plugin  : 17.2.8
   @nx/nest           : 17.2.8
   @nx/node           : 17.2.8
   @nrwl/tao          : 17.2.8
   @nx/webpack        : 17.2.8
   typescript         : 5.3.3

Failure Logs

No response

Package Manager Version

No response

Operating System

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

Additional Information

No response

@AgentEnder AgentEnder added the scope: core core nx functionality label Jan 28, 2024
meeroslav added a commit that referenced this issue May 20, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22098
Fixes #21180
Fixes #21009

---------

Co-authored-by: James Henry <[email protected]>
FrozenPandaz pushed a commit that referenced this issue May 21, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22098
Fixes #21180
Fixes #21009

---------

Co-authored-by: James Henry <[email protected]>
(cherry picked from commit 0eb86c8)
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 Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants