Repository navigation
fix(deps): package-lock.json を再生成して CI の npm ci 失敗を解消 - #339
Merged
Merged
Conversation
astro 7.4.1 への更新 (#338) 以降、prettier-plugin-astro 1.1.1 が要求する @astrojs/compiler-rs ^0.4.0 のネストエントリが lockfile に無く、 CI の npm ci が package.json との不整合で失敗していた。 npm install で lockfile を再生成し、prettier-plugin-astro 配下に @astrojs/compiler-rs 0.4.1 と compiler-binding 群を追加する。 あわせて、どのパッケージも依存していない @astrojs/compiler 2.13.1 の 孤立エントリが削除される。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
master の CI(
gh-pages.ymlの build ジョブ)がnpm ci --ignore-scriptsで失敗しているのを修正します。失敗した run: https://github.com/cybozu/frontend-monthly/actions/runs/41805427621/job/126491130430
原因
#338 で astro を 7.3.1 → 7.4.1 に更新した際、
@astrojs/compiler-rsの依存解決が不完全なまま lockfile が更新されていました。@astrojs/compiler-rs ^0.5.1を要求し、lockfile のトップレベルは 0.5.2 に更新済み@astrojs/compiler-rs ^0.4.0を要求する(更新前はトップレベルが 0.4.0 で両方を満たしていた)node_modules/prettier-plugin-astro/node_modules/@astrojs/compiler-rsにネストされるべき 0.4.x のエントリが lockfile に無く、npm ciが不整合として検出していた変更内容
npm installで lockfile を再生成しました(手編集なし)。差分は package-lock.json のみです。node_modules/prettier-plugin-astro/node_modules/@astrojs/compiler-rs@0.4.1と@astrojs/compiler-binding-*@0.4.1群@astrojs/compiler@2.13.1(どのパッケージからも依存されていない孤立エントリ)resolvedはすべてnpm.flatt.techのまま見送ったこと
prettier-plugin-astro 1.1.2 は
@astrojs/compiler-rs ^0.5.2に対応しており、更新すれば compiler-rs を 1 バージョンに統一できます。ただし公開が 2026-10-23 で、.npmrcのmin-release-age=14にかかるため今回は見送りました。2026-11-06 以降に別 PR で更新するのがよさそうです。確認したこと
npm ci --ignore-scripts --dry-run(CI と同じ)が同期エラーなしで成功npm run build(astro check && tsc --noEmit && astro build):74 ページ