#Error: Failed versioning check

17 messages · Page 1 of 1 (latest)

real orchid
#

Hello, when I use the command yarn backstage-cli versions:check --fix there are still pakage that need to be modified by hand. However, all packages are in the yarn.lock... How can I solve this problem please?

yarn backstage-cli versions:check --fix
The following packages must be deduplicated by updating dependencies in package.json

  @backstage/backend-app-api @ ^0.7.3 should be changed to ^0.9.1
  @backstage/backend-app-api @ ^0.8.0 should be changed to ^0.9.1

The following packages can be deduplicated by updating dependencies in package.json

  @backstage/backend-common @ ^0.22.0 should be changed to ^0.24.0
  @backstage/backend-common @ ^0.23.2 should be changed to ^0.24.0
  @backstage/backend-common @ ^0.23.3 should be changed to ^0.24.0
  @backstage/backend-plugin-api @ ^0.6.18 should be changed to ^0.8.0
  @backstage/backend-plugin-api @ ^0.6.21 should be changed to ^0.8.0
  @backstage/backend-plugin-api @ ^0.7.0 should be changed to ^0.8.0
  @backstage/core-components @ ^0.9.4 should be changed to ^0.14.10
  @backstage/frontend-plugin-api @ ^0.6.5 should be changed to ^0.7.0
  @backstage/plugin-auth-node @ ^0.4.13 should be changed to ^0.5.0
  @backstage/plugin-auth-node @ ^0.4.16 should be changed to ^0.5.0
  @backstage/plugin-auth-node @ ^0.4.17 should be changed to ^0.5.0
  @backstage/plugin-permission-common @ ^0.7.14 should be changed to ^0.8.1
  @backstage/plugin-permission-node @ ^0.7.32 should be changed to ^0.8.1
  @backstage/theme @ ^0.2.15 should be changed to ^0.5.6
fair bough
#

If that were me.. I would start by running "yarn why @backstage/backend-app-api" and then look at each package that includes that package and then one by one trying to get them all into line.

#

I would then perform the same steps for each of the duplicated pacakges.

real orchid
#

@fair bough thanks for your instant response!
this is the command outpout :

yarn why @backstage/backend-app-api
├─ @backstage/backend-common@npm:0.22.0
│  └─ @backstage/backend-app-api@npm:0.7.9 (via npm:^0.7.3)
│
├─ @backstage/backend-common@npm:0.22.0 [3d1c0]
│  └─ @backstage/backend-app-api@npm:0.7.9 (via npm:^0.7.3)
│
├─ @backstage/backend-defaults@npm:0.4.3
│  └─ @backstage/backend-app-api@npm:0.9.2 (via npm:^0.9.1)
│
├─ @backstage/backend-test-utils@npm:0.4.4
│  └─ @backstage/backend-app-api@npm:0.8.0 (via npm:^0.8.0)
│
└─ @backstage/backend-test-utils@npm:0.4.4 [a9cec]
   └─ @backstage/backend-app-api@npm:0.8.0 (via npm:^0.8.0)

I dont understand how to get them all into line. Can you explain this part please or maybe have you an example? Thank you

fair bough
#

Just to explain one section... the following means that backend-app-api 0.7.3 is included by backend-common 0.22.0

├─ @backstage/backend-common@npm:0.22.0
│  └─ @backstage/backend-app-api@npm:0.7.9 (via npm:^0.7.3)

so the next step is to run:

yarn why @backstage/backend-common

#

Is this helping?

real orchid
#

@fair bough hi, not really. There is some cycling deps and it is hard to do it one by one.Most of deps are used by other deps in the node_module.
So, I try to "block" specific version in the root package.json by adding them like this:

"resolutions": {
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "better-sqlite3": "^9.6.0",
    "@backstage/catalog-model": "^0.6.18",
...
  },

Like this, versions:check pass but I dont know if its a good practice and that breaks some plugins :/

fair bough
#

I probably wouldnt use resolutions.. its better to get those plugins updated.

real orchid
#

@fair bough I must do the same thing for this error please? :

yarn backstage-cli versions:check --fix
Error: No entry data for @backstage/config-loader@^1.8.0
old rivet
#

Hi @real orchid, what version of Backstage are you on? Also, are these actually causing you any issues? If you are on a release from the last 3 months or so these might simply be noise. These do look fairly new.

Mentioning this as this command has been removed in 1.30.0: https://backstage.io/docs/releases/v1.30.0#breaking-backstagecli

real orchid
#

@old rivet I am using the 1.27 version.

old rivet
#

OK, then are you actually seeing errors? Is anything not working? I know I was running the Demo site with these messages with that version without issues.

real orchid
#

For the moment I ve try to update package.json by hand when possible , then run the command yarn backstage-cli versions:check --fix but this break some things in our plugins... So I ve rollback all of this...

Btw, interesting changlog for the 1.30. I will try yarn dedupe now. Thanks for the info.

old rivet
#

Why do you do this: "For the moment I ve try to update package.json by hand when possible"? Are you not using yarn backstage-cli versions:bump --release main?

real orchid
old rivet
#

Ok, you should not be doing this by hand. I’d really recommend digging into the root cause. I’ve been using the version bump command for several years and it’s rock solid. When it hasn’t worked, which was rare, it was always something I had done.