sou*_*net 10 debian node.js yarnpkg
试图用纱线安装一个包,但是我得到并且错误地说我需要nodejs,但安装nodejs会删除yarn.同样,当我安装yarn时,会删除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
...
Run Code Online (Sandbox Code Playgroud)
and*_*yjv 13
尝试在WSL上安装Yarn和NodeJS时遇到了这个问题.以下是我为使其工作而采取的步骤:
apt-get remove node
apt-get remove yarn
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6908 次 |
| 最近记录: |