Tôi gặp vấn đề tương tự trên Ubuntu 17.04.
Giải pháp này làm việc cho tôi:
sudo apt remove cmdtest
sudo apt remove yarn
curl -sS 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
sau đó
$ yarn install
kết quả:
yarn install v1.3.2
warning You are using Node "6.0.0" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Lockfile not saved, no dependencies.
Done in 0.20s.
Hy vọng rằng tôi t sẽ giúp bạn.
Vui lòng chạy 'yarn install --verbose' và thêm thông tin mở rộng. Bạn có chắc là bạn đang chạy sợi trong thư mục bên phải (chứa một package.json)? – chaenu