前提・実現したいこと
Angularの勉強を初めて3日ほどのペーペーです。
山田祥寛さんのAngularアプリケーションプログラミングの導入編・基礎編を読みながら、サンプルコードで遊んでいます。
基礎編まで一通り見たので、実際にSTSで作成している既存のプロジェクトでAngularを導入したいと思っています。
そこで、AngularCLIという便利そうなものを知り、これは使ってみなければ!という流れでターミナルでコマンドを叩きました。
$ npm install -g @angular/cli
ですが、下記のようなエラーが出てしまいました。
発生している問題・エラーメッセージ
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } 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 (though this is not recommended). npm ERR! A complete log of this run can be found in: npm ERR! /Users/XXXXXXXXXX/.npm/_logs/2018-11-14T11_29_46_205Z-debug.log
書籍を進める中でNode.jsもインストールしていて、バージョンはv10.13.0です。
書籍の中でやったこと以外は特に変わったことはしていない気がしているので、
何が起きているんだ、、という感じです。
解決方法のわかる方いらっしゃいましたら、ご教示お願いいたします。
補足情報(FW/ツールのバージョンなど)
mac
node.js
Angular
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/14 23:56