Skip to content

Fix failing npm ci on ionos-dev#199

Closed
thlehmann-ionos wants to merge 2 commits intoionos-devfrom
tl/dev/fix-package-lock-1350
Closed

Fix failing npm ci on ionos-dev#199
thlehmann-ionos wants to merge 2 commits intoionos-devfrom
tl/dev/fix-package-lock-1350

Conversation

@thlehmann-ionos
Copy link

@thlehmann-ionos thlehmann-ionos commented Jul 29, 2025

Background

The current branch and recent tags fail buils due to npm ci failing with
these errors:

...
npm error Invalid: lock file's @volar/language-core@2.4.20 does not satisfy @volar/language-core@2.4.22
npm error Invalid: lock file's @volar/source-map@2.4.20 does not satisfy @volar/source-map@2.4.22
...

After installing the dependencies using npm install for diagnosis,
running npm why showed the dependency graph:

@volar/language-core@2.4.11 dev
custom-npms/nc-nextcloud-vue/node_modules/@volar/language-core
...

The fact that this dependency originated from a transitive dependency and
is not included in package.json is suspicious already, meaning we have no
direct control over it by updating dependencies.

Bisecting showed the error first appeared with the v31 merge

1a19b2f4547f3b891a078f1bff1fc57cb1715f51

Builds prior this version install just fine.

I suspect the merge conflict for package-lock.json was not correctly
solved back then and left the package-lock semantically broken.

Previous commit

In the previous commit we checked out the upstream package.json and
package-lock.json, taking them as ground trouth.

Approach to fix

  1. Checkout upstream package* files prior to the merge
  2. Apply all changes compared to upstream again

== Background

The current branch and recent tags fail buils due to npm ci failing with
these errors:

   ...
   npm error Invalid: lock file's @volar/language-core@2.4.20 does not satisfy @volar/language-core@2.4.22
   npm error Invalid: lock file's @volar/source-map@2.4.20 does not satisfy @volar/source-map@2.4.22
   ...

After installing the dependencies using npm install for diagnosis,
running npm why showed the dependency graph:

  @volar/language-core@2.4.11 dev
  custom-npms/nc-nextcloud-vue/node_modules/@volar/language-core
  ...

The fact that this dependency originated from a transitive dependency and
is not included in package.json is suspicious already, meaning we have no
direct control over it by updating dependencies.

Bisecting showed the error first appeared with the v31 merge

   1a19b2f

Builds prior this version install just fine.

I suspect the merge conflict for package-lock.json was not correctly
solved back then and left the package-lock semantically broken.

== Approach to fix

1. Checkout upstream package* files prior to the merge (this commit)
2. Apply all changes compared to upstream again (next commit)

== Command

   git checkout v31.0.6 -- package.json package-lock.json
@thlehmann-ionos thlehmann-ionos force-pushed the tl/dev/fix-package-lock-1350 branch 3 times, most recently from f3c8552 to becd273 Compare July 29, 2025 14:50
@thlehmann-ionos
Copy link
Author

@thlehmann-ionos thlehmann-ionos marked this pull request as ready for review July 30, 2025 07:21
Copy link

@printminion-co printminion-co left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vue-material-design-icons is missing

@thlehmann-ionos thlehmann-ionos force-pushed the tl/dev/fix-package-lock-1350 branch from ae818cc to 2a83a80 Compare August 4, 2025 09:50
== Background

The current branch and recent tags fail buils due to npm ci failing with
these errors:

   ...
   npm error Invalid: lock file's @volar/language-core@2.4.20 does not satisfy @volar/language-core@2.4.22
   npm error Invalid: lock file's @volar/source-map@2.4.20 does not satisfy @volar/source-map@2.4.22
   ...

After installing the dependencies using npm install for diagnosis,
running npm why showed the dependency graph:

  @volar/language-core@2.4.11 dev
  custom-npms/nc-nextcloud-vue/node_modules/@volar/language-core
  ...

The fact that this dependency originated from a transitive dependency and
is not included in package.json is suspicious already, meaning we have no
direct control over it by updating dependencies.

Bisecting showed the error first appeared with the v31 merge

   1a19b2f

Builds prior this version install just fine.

I suspect the merge conflict for package-lock.json was not correctly
solved back then and left the package-lock semantically broken.

== Previous commit

In the previous commit we checked out the upstream package.json and
package-lock.json, taking them as ground truth.

== Approach to fix

1. Checkout upstream package* files prior to the merge (previous commit)
2. Apply all changes compared to upstream again (this commit)

== Re-applying our customizations

Previous merge was:

   1a19b2f
   Merge tag 'v31.0.6' into tmp/update-to-v31.0.6-20250702100826

Our HEAD before merge was:

   7e474f1
   IONOS(simplesettings): submodule update (workflows, refactor core code)

Determining the changes from our pre-merge revision to the current revision:

   git diff 7e474f1..HEAD -- package.json | grep 'file:'

Changes from ours to v31.0.6:

   git diff 7e474f1..HEAD --no-ext-diff -- package.json | grep 'file:'
   -    "@nextcloud/vue": "file:./custom-npms/nc-nextcloud-vue",
   -    "vue-material-design-icons": "file:./custom-npms/nc-vue-material-design-icons/dist",
   -    "@mdi/svg": "file:./custom-npms/nc-mdi-svg/dist",
   -    "@mdi/js": "file:./custom-npms/nc-mdi-js"

Install:

   $ rm -rf node_modules/
   $ npm ci

Change modules:

   -    "@mdi/js": "^7.4.47",
   -    "@mdi/svg": "^7.4.47",
   +    "@mdi/js": "file:custom-npms/nc-mdi-js",
   +    "@mdi/svg": "file:custom-npms/nc-mdi-svg/dist",

   -    "@nextcloud/vue": "^8.27.0",
   +    "@nextcloud/vue": "file:custom-npms/nc-nextcloud-vue",

   -    "vue-material-design-icons": "^5.3.1",
   +    "vue-material-design-icons": "file:custom-npms/nc-vue-material-design-icons/dist",

Add overrides

   "vue-material-design-icons" : "$vue-material-design-icons",
   "@mdi/svg" : "$@mdi/svg",
   "@mdi/js" : "$@mdi/js",
   "@nextcloud/vue" : "$@nextcloud/vue"

Re-install of overrides:

   $ npm install
@thlehmann-ionos thlehmann-ionos force-pushed the tl/dev/fix-package-lock-1350 branch from 2a83a80 to 437b054 Compare August 4, 2025 15:51
@thlehmann-ionos
Copy link
Author

vue-material-design-icons is missing

Fixed.

@thlehmann-ionos
Copy link
Author

See

@printminion-co
Copy link

fixed via #209 with ./<docs-n-tools>/tools/relink-npm-modules.sh v31.0.6 --commit

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants