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

Astro3.0へアップデート #172

Open
jacopen opened this issue Sep 3, 2023 · 1 comment
Open

Astro3.0へアップデート #172

jacopen opened this issue Sep 3, 2023 · 1 comment

Comments

@jacopen
Copy link
Contributor

jacopen commented Sep 3, 2023

No description provided.

@jacopen
Copy link
Contributor Author

jacopen commented Sep 5, 2023

単純に

npm i astro@latest

すると依存関係のエラーが出て死ぬ

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @astrojs/image@0.18.0
npm ERR! Found: astro@3.0.8
npm ERR! node_modules/astro
npm ERR!   astro@"^3.0.8" from the root project
npm ERR!   peer astro@"^3.0.0" from @astrojs/markdown-remark@3.0.0
npm ERR!   node_modules/@astrojs/markdown-remark
npm ERR!     @astrojs/markdown-remark@"3.0.0" from astro@3.0.8
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer astro@"^2.10.15" from @astrojs/image@0.18.0
npm ERR! node_modules/@astrojs/image
npm ERR!   @astrojs/image@"^0.18.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: astro@2.10.15
npm ERR! node_modules/astro
npm ERR!   peer astro@"^2.10.15" from @astrojs/image@0.18.0
npm ERR!   node_modules/@astrojs/image
npm ERR!     @astrojs/image@"^0.18.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/jacopen/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jacopen/.npm/_logs/2023-09-05T11_40_26_828Z-debug-0.log

astrojs/imageが使われていることが問題で、これはv3になって非対応になった。
https://docs.astro.build/en/guides/upgrade-to/v3/#removed-astrojsimage

以下の手順に従ってImageやPictureコンポーネントを置き換える必要がある
https://docs.astro.build/en/guides/images/#remove-astrojsimage

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

No branches or pull requests

1 participant