티스토리 뷰

https://danco.tistory.com/53

 

[NodeJs] nodemon 설치

개발시에 코드를 수정하고 서버를 껐다가 다시 켜야하는게 매우 번거롭기 때문에 코드 수정이 있으면 서버를 자동으로 restart해주는 모듈인 nodemon을 설치하는 방법은 다음과 같다. npm install nodemon -g node..

danco.tistory.com

 

글에 나온것처럼 npm install nodemon -g로 설치했는데, 

 

npm ERR! path /Users/sweetdev/.npm-global/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/sweetdev/.npm-global/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/Users/sweetdev/.npm-global/lib/node_modules']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/Users/sweetdev/.npm-global/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/Users/sweetdev/.npm-global/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).

 

이런 에러들이 나왔다ㅠㅠ 

 

https://stackoverflow.com/questions/47252451/permission-denied-when-installing-npm-modules-in-osx

이 글의 옵션 1을 사용해서 해결했다 :)

 

Permission denied when installing npm modules in OSX

I'm trying to install node-g.raphael, and I'm getting the following error: Bender-03:htdocs alfred$ sudo npm install node-g.raphael --save Password: > contextify@0.1.15 install /Users/alfred/

stackoverflow.com

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

 

 

하지만 여전히 콘솔에서 nodemon app.js를 치면,

command not found가 나왔다...ㅠㅠ

 

npx nodemon 하면 로컬에서 실행되긴 하지만, 되긴 된다!!

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/11   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
글 보관함