2
糸を使ってパッケージをインストールしようとしていますが、nodejsが必要だと言ってエラーが出ますが、nodejsをインストールすると糸が取り除かれます。同様に、ヤーンをインストールすると、nodejsが削除されます。私は何が欠けていますか?糸の取り付け中に糸依存性nodejsが除去され、その逆も同様です。
$ yarn install some-package
Yarn requires Node.js 4.0 or higher to be installed.
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
...
...
$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gyp libc-ares-dev libjs-node-uuid libv8-3.14-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
yarn
The following NEW packages will be installed:
nodejs
...
$ sudo apt-get install yarn
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gyp libc-ares-dev libjs-node-uuid libv8-3.14-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
nodejs
The following NEW packages will be installed:
yarn
...
ヤーンチーム[可能であればNPM経由でインストールすることをおすすめします](https://yarnpkg.com/en/docs/install#alternatives-tab) - [ウェブサイトの手順](https ://yarnpkg.com/en/docs/install#linux-tab)。 –
@JoeClayはい、私は知っていますが、OPは「推奨される方法」を実行することでインストールできません。私は彼がnpmや他の方法でインストールしようとしていることに注意してください。(ノードの古いバージョンで問題を修正した後) – greuze
私は彼らが推奨された方法に完全に従っているとは思わないでしょうか?彼らはNodeSourceリポジトリからNodeとYarnの両方を取得しようとしているようですが、NodeSourceとYarnからNodeを自分のリポジトリから取得するように指示されています( 'https:// dl.yarnpkg.com/debian /')。おそらく、彼らはちょうどその部分を質問から外しました。 –