Ubuntu 14.x とクライアントの CMS を Vagrant (関連する場合は Laravel プラットフォーム) で実行しています。パッケージと依存関係を扱うことは私にとって初めてであり、頭が泳いでしまうので、範囲が広いことを許してください。基本的に概念を理解できるように没頭する必要があります。とはいえ、私が目にする投稿の数からすると、他の開発者も同じ課題に直面しているように見えます。
README.md にはyarn
、リポジトリのクローンを作成した後、実行してすべてをビルドするように書かれています。その時点までのコマンドは次のとおりです。
which nodejs # /usr/bin/nodejs
nodejs -v # v4.7.3
npm install -g yarn #this installed yarn v0.19.1
yarn
次のシーケンスを取得します。実行しようとするたびにyarn
、次のエラーが発生します。興味深いことに、4 回のうち 2 回試してみたところ、別のシンボリック リンクが参照されていました。
root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../babylon/bin/babylon.js' -> '/var/www/mycms/node_modules/babel-core/node_modules/.bin/babylon'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../normalize-package-data/node_modules/semver/bin/semver' -> '/var/www/mycms/node_modules/accord/node_modules/.bin/semver'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../babylon/bin/babylon.js' -> '/var/www/mycms/node_modules/babel-core/node_modules/.bin/babylon'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn #
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../babylon/bin/babylon.js' -> '/var/www/mycms/node_modules/babel-core/node_modules/.bin/babylon'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
簡潔であることを願っている2つの質問があります。
- を取り除くにはどうすればよいですか
mycms@0.0.1: No license field
(そして、これを行うことが重要ですか)? dependencies
との間の衝突を解決するにはどうすればよいdevDependencies
ですか? 私は開発環境で作業していますが、明らかにyarn.lock
(?) ファイルに触れたくありません。- 2 つのバージョンのうち大きい方を と の両方に使用した場合
dependencies
(devDependencies
これがコードで機能する場合)、このエラー メッセージが表示されなくなりますか?