N予備校のプログラミング入門Webアプリコースの話題です。
環境はWindows8.1です。
※非推奨環境です。
サーバーサイドプログラミング入門で以下のエラーが発生しました。
vagrant@ubuntu-bionic:~/workspace/hubot-todo$ yarn add ../todo yarn add v1.21.1 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... [4/5] Linking dependencies... error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../sshpk/bin/sshpk-conv' -> '/home/vagrant/workspace/hubot-todo/node_modules/http-signature/node_modules/.bin/sshpk-conv'". info If you think this is a bug, please open a bug report with the information provided in "/home/vagrant/workspace/hubot-todo/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
yarnコマンドに--no-bin-linksオプションをつけることでエラーをつけて回避できます。
このオプションの意味を私は理解していませんが、課題達成は問題なくできます。
vagrant@ubuntu-bionic:~/workspace/hubot-todo$ yarn add ../todo --no-bin-links yarn add v1.21.1 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... [4/5] Linking dependencies... [5/5] Building fresh packages... success Saved lockfile. success Saved 1 new dependency. info Direct dependencies └─ todo@1.0.0 info All dependencies └─ todo@1.0.0 Done in 1.41s.エラーの解消にあたって、Windows環境でnpm installでエラーが発生する場合の対処法を参照いたしました。