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

yarnをやめる #6222

Closed
syuilo opened this issue Apr 4, 2020 · 23 comments
Closed

yarnをやめる #6222

syuilo opened this issue Apr 4, 2020 · 23 comments
Labels
💬Discussion Being discussed or needs discussion

Comments

@syuilo
Copy link
Member

syuilo commented Apr 4, 2020

Summary

バージョン上げると依存関係がインストールできなくなったりしてサポートが面倒なのでnpmにしたい
ご意見募集中

@syuilo syuilo added the 💬Discussion Being discussed or needs discussion label Apr 4, 2020
@mei23
Copy link
Contributor

mei23 commented Apr 4, 2020

バージョン上げると依存関係がインストールできなくなったりして

え、そんなことないよ…

@syuilo
Copy link
Member Author

syuilo commented Apr 4, 2020

couldn't be built successfully
とか出てインストールできなくなった

@acid-chicken
Copy link
Member

それどの道 npm でも node-gyp で落ちませんか

@syuilo
Copy link
Member Author

syuilo commented Apr 5, 2020

それどの道 npm でも node-gyp で落ちませんか

npmだと大丈夫だった

@u1-liquid
Copy link
Sponsor Contributor

Yarn 2入れちゃっておかしくなったのかも(まだYarn 2対応していない?)
https://yarnpkg.com/advanced/migration

@acid-chicken
Copy link
Member

acid-chicken commented Apr 5, 2020

couldn't be built successfully って何なのかと思ったら v2 のエラーか……
#5858 でも話しているとおり v2 を使う場合は移行作業がいります

@acid-chicken
Copy link
Member

というか v2 入ってても yarn set version berry しない限りは v1 にフォールバックされませんか?

@acid-chicken
Copy link
Member

あ、

バージョンを上げる

ってそういうことか

@mei23
Copy link
Contributor

mei23 commented Apr 5, 2020

yarn.lockのバージョンが変わっちゃってる
syuilo/Misskey.old@1b9f8a8

- # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
- # yarn lockfile v1

+ # This file is generated by running "yarn install" inside your project.
+ # Manual changes might be lost - proceed with caution!
+ 
+ __metadata:
+  version: 4

@acid-chicken
Copy link
Member

v2 を使う方向で行くなら #5858 に議論を移すか、v1 のままで行くなら当該コミットを一旦差し戻しましょう。

@rinsuki
Copy link
Contributor

rinsuki commented Apr 8, 2020

とりあえず yarn.lock revertしたい

@syuilo
Copy link
Member Author

syuilo commented Apr 11, 2020

revertしてもpackage.jsonとのズレが生じるけどどうしたら良いんだろう

@mei23
Copy link
Contributor

mei23 commented Apr 11, 2020

revertして、yarn v1 で yarn 叩けば yarn.lock なおしてくれたりしませんかね?

@acid-chicken
Copy link
Member

revertして、yarn v1 で yarn 叩けば yarn.lock なおしてくれたりしませんかね?

直る https://gist.github.com/acid-chicken/a2d609830ed97791d4f622d9f68f0a4b

@rinsuki rinsuki mentioned this issue Mar 13, 2021
@rinsuki
Copy link
Contributor

rinsuki commented Mar 13, 2021

@syuilo
(前にもこんな感じの話したかもしれないけど記憶から消えたので再度)
https://github.com/rogeriochaves/npm-force-resolutions 使う

@syuilo
Copy link
Member Author

syuilo commented Mar 13, 2021

yarn使ってる理由ってresolutions解釈して欲しいだけだったと思うので、↑にすればyarnやめられそう

@rinsuki
Copy link
Contributor

rinsuki commented Mar 13, 2021

requiredなのはそれだけだけどそれ以外にも npm は QWERTY 配列で右側にめちゃくちゃ偏るけど yarn は左右にいい感じに分散してるとか yarnnpm run xxxyarn xxx で行けるとかもある

yarn入ってないNode.js開発環境もあんまりない気がするし (これは主観かも) Dockerのnodeイメージにも最初から入ってるし

@syuilo
Copy link
Member Author

syuilo commented Mar 13, 2021

なるほど

@tamaina
Copy link
Contributor

tamaina commented Apr 7, 2022

v2に移行とかよくわからんからyarnやめようぜ

@acid-chicken
Copy link
Member

v2に移行とかよくわからんからyarnやめようぜ

やめて何使うの

@syuilo
(前にもこんな感じの話したかもしれないけど記憶から消えたので再度)
https://github.com/rogeriochaves/npm-force-resolutions 使う

npm に無理やり resolution 解決させる類い、確か lockfile 周りが残念な感じになって不整合の元になる

@syuilo
Copy link
Member Author

syuilo commented Apr 7, 2022

最近のnpmってresolutionサポートなかったっけ?
なくてもまもなくサポートされそうな雰囲気はある

@acid-chicken
Copy link
Member

npm/cli#4116 で似た機能は入ったらしい(互換性はないが)

@ThatOneCalculator
Copy link
Contributor

ThatOneCalculator commented Apr 7, 2022

v2に移行とかよくわからんからyarnやめようぜ

Why even have v2 in the discussion when v3 is out already? I've been using v3 with Misskey with no issues.

@tamaina tamaina closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬Discussion Being discussed or needs discussion
Projects
None yet
Development

No branches or pull requests

7 participants