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

[Bug]: Can not install latest version with "npm install" #1867

Closed
developingdenny opened this issue Dec 4, 2022 · 1 comment
Closed

[Bug]: Can not install latest version with "npm install" #1867

developingdenny opened this issue Dec 4, 2022 · 1 comment

Comments

@developingdenny
Copy link

Version

12.2.3 (latest)

Steps to reproduce

The dependencies listed in package.json published to npm appear to be inconsistent with those intended.

The package.json file in the repository declares version 12.2.3 dependencies on Jest version 29; however, the package.json retrieved and installed in node_modules via npm install states dependencies on Jest version 28.

The result is that jest-preset-angular version 12.2.3 cannot be installed via npm install without applying the --force flag.

The issue can be seen by attempting to install from npm to setup the example Angular 14 project.

  1. Clone jest-preset-angular project from github
  2. Open the example project via terminal: cd examples/example-app-v14
  3. Run npm install

Note installation fails due to unmet peer dependency related to Jest as shown below.

image

Errors state that jest-preset-angular depends on Jest version 28. However, the latest package.json in the repository declares that version 12.2.3 depends on Jest version 29.

Running npm install --force will retrieve jest-preset-angular version 12.2.3 from npm and place it into local project directory node_modules.

As shown below, the package.json within that installed package states a Jest 28 dependency:

image

Expected behavior

Using npm install succeeds without complaints of unresolved peer dependencies.

Installing jest-preset-angular version 12.2.3 completes with package.json file that declares peer dependencies on Jest 29, not Jest 28.

Actual behavior

Cannot install project depending on jest-preset-angular version 12.2.3 via npm install without producing peer dependency error messages and/or applying the --force flag.

Additional context

I suspect somehow the latest package.json file contents from the repository has not been / is not being included when publishing to npm.

Environment

System:
    OS: macOS 13.0
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 16.18.1 - /usr/local/bin/node
    npm: 8.19.2 - /usr/local/bin/npm
  npmPackages:
    jest: ^29.1.2 => 29.3.1
@ahnpnl
Copy link
Collaborator

ahnpnl commented Dec 4, 2022

Duplicated with #1774 please follow the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants