angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open p3x-robot opened this issue 1 year ago • 3 comments

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

p3x-robot avatar Jul 15 '24 12:07 p3x-robot

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.

dgp1130 avatar Jul 15 '24 21:07 dgp1130

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.)

rubiesonthesky avatar Jul 16 '24 22:07 rubiesonthesky

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.

dgp1130 avatar Jul 16 '24 22:07 dgp1130

Closing as this is working as intended.

alan-agius4 avatar Apr 04 '25 10:04 alan-agius4

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.