nodemonをinstallできません。どのようにしたらインストールできるようになるのでしょうか?
ちなみにnpmのversionは5.6.0です。
hattoriorunoMBP:~ hattoriakitsugu$ npm install nodemon -g
npm WARN checkPermissons Missing write access to /Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon
npm ERR! path /Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCESS: permission denied, access '/Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon'
npm ERR! { Error: EACCESS: permission denied, access '/Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon'
npm ERR! stack: 'Error: EACCESS: permission denied, access \'/Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCESS',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hattoriakitsugu/.npm/_logs\2018-05-20T00_03_54_549Z-debug.log
追記
さらに、sudoコマンドを使ってもできませんでした。
hattoriorunoMBP:~ hattoriakitsugu$ sudo npm install nodemon -g
Password:
/Users/hattoriakitsugu/.npm-global/bin/nodemon -> /Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon/bin/nodemon.js
> nodemon@1.17.4 postinstall /Users/hattoriakitsugu/.npm-global/lib/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
+ nodemon@1.17.4
updated 1 package in 7.455s