@takuyakasagawa (kasa kasa)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

yarnインストールしたいですがエラーが発生してしまいます

解決したいこと

yarnがエラーが発生してインストールできないです。
解決方法を教えてください。
また参考記事などあれば助かります。

発生している問題・エラー

npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/yarn/bin/yarn.js
npm ERR! dest /usr/local/bin/yarn
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/yarn/bin/yarn.js' -> '/usr/local/bin/yarn'
npm ERR!  [Error: EACCES: permission denied, symlink '../lib/node_modules/yarn/bin/yarn.js' -> '/usr/local/bin/yarn'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../lib/node_modules/yarn/bin/yarn.js',
npm ERR!   dest: '/usr/local/bin/yarn'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kasagawatakuya/.npm/_logs/2022-12-18T13_55_00_696Z-debug-0.log

該当するソースコード

npm install -g yarn

自分で試したこと

ターミナルで
npm install -g yarn
を実行

0 likes

1Answer

>npm ERR! code EACCES
>npm ERR! Error: EACCES: permission denied

書き込み権限が無いのでエラーが発生しています。
書き込み先のディレクトリの権限、または実行しているアカウントの権限を確認して下さい。

1Like

Comments

Your answer might help someone💌