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

We analyzed your package.json and everything seems to be in order. Good work! #28053

Open
p3x-robot opened this issue Jul 15, 2024 · 3 comments

Comments

@p3x-robot
Copy link

Which @angular/* package(s) are the source of the bug?

upgrade

Is this a regression?

Yes

Description

patrikx3@demona:/media/linux-storage-nvme/patrikx3-home/Projects/patrikx3/p3x/angular-compile$ ncu
Using config file /media/linux-storage-nvme/patrikx3-home/Projects/patrikx3/p3x/angular-compile/.ncurc.json
Checking /media/linux-storage-nvme/patrikx3-home/Projects/patrikx3/p3x/angular-compile/package.json
[====================] 35/35 100%

 @angular-devkit/build-angular           ^18.0.6  →       ^18.1.0
 @angular/animations                     ^18.0.5  →       ^18.1.0
 @angular/cdk                            ^18.0.5  →       ^18.1.0
 @angular/cli                            ^18.0.6  →       ^18.1.0
 @angular/common                         ^18.0.5  →       ^18.1.0
 @angular/compiler                       ^18.0.5  →       ^18.1.0
 @angular/compiler-cli                   ^18.0.5  →       ^18.1.0
 @angular/core                           ^18.0.5  →       ^18.1.0
 @angular/forms                          ^18.0.5  →       ^18.1.0
 @angular/material                       ^18.0.5  →       ^18.1.0
 @angular/platform-browser               ^18.0.5  →       ^18.1.0
 @angular/platform-browser-dynamic       ^18.0.5  →       ^18.1.0
 @angular/router                         ^18.0.5  →       ^18.1.0
 @types/node                            ^20.14.9  →     ^20.14.10
 @typescript-eslint/eslint-plugin         7.15.0  →        7.16.0
 @typescript-eslint/parser                7.15.0  →        7.16.0
 corifeus-builder                   ^2024.10.103  →  ^2024.10.111
 eslint-plugin-jsdoc                      48.5.0  →        48.7.0

Run ncu -u to upgrade package.json
patrikx3@demona:/media/linux-storage-nvme/patrikx3-home/Projects/patrikx3/p3x/angular-compile$ ng update
Using package manager: npm
Collecting installed dependencies...
Found 42 dependencies.
    We analyzed your package.json and everything seems to be in order. Good work!
patrikx3@demona:/media/linux-storage-nvme/patrikx3-home/Projects/patrikx3/p3x/angular-compile$

Please provide a link to a minimal reproduction of the bug

try to update and it says "We analyzed your package.json and everything seems to be in order. Good work!"

Please provide the exception or error you saw

this is an "exception" error

Please provide the environment you discovered this bug in (run ng version)

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 18.1.0
Node: 22.4.1
Package Manager: npm 10.8.1
OS: linux x64

Angular: 18.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1801.0
@angular-devkit/build-angular   18.1.0
@angular-devkit/core            18.1.0
@angular-devkit/schematics      18.1.0
@schematics/angular             18.1.0
rxjs                            6.6.7
typescript                      5.4.5
zone.js                         0.14.7

Anything else?

No response

@JeanMeche JeanMeche transferred this issue from angular/angular Jul 15, 2024
@dgp1130
Copy link
Collaborator

dgp1130 commented Jul 15, 2024

The ng version output indicates that you're on 18.1.0, which is the current latest. So I think the message is accurate.

What exactly is ncu? Is that npm-check-updates? Based on:

Run ncu -u to upgrade package.json

I'm guessing it updated your node_modules but not the package.json? I think ng update checks the currently installed version, not the one referenced in package.json. If you reinstall a fresh copy of node_modules and update without ncu it should run as expected: rm -rf node_modules/ && npm ci && ng update @angular/core @angular/cli.

@rubiesonthesky
Copy link

rubiesonthesky commented Jul 16, 2024

ncu just runs the check to see if there are updates for dependencies listed in package.json. Running it with -u only updates package.json and to actually install the updates, user needs to run npm install themself.

So guess the problem OP has is that two different tools that should check the same package.json file are giving different answers. (Or maybe ncu checks node_modules, and that would explain the difference.)

@dgp1130
Copy link
Collaborator

dgp1130 commented Jul 16, 2024

Angular checks node_modules/. If the node_modules/ versions are 18.1.x (which is implied from the ng version output), then I think this is working as intended.

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

3 participants