• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Node.js, Express 게시판 npm install -g nodemon 오류

npm install -g nodemon 오류

4 글 보임 - 1 에서 4 까지 (총 4 중에서)
  • 글쓴이
  • #36066

    Heok Joon
    참가자

    jasonmoon@Jasons-MacBook-Pro-2 nodeJS % sudo chown -R ownerName:/usr/local/lib/node_modules/nodemon
    usage: chown [-fhnvx] [-R [-H | -L | -P]] owner[:group] file ...
    chown [-fhnvx] [-R [-H | -L | -P]] :group file ...
    jasonmoon@Jasons-MacBook-Pro-2 nodeJS % npm install -g nodemon
    npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
    npm ERR! code EACCES
    npm ERR! syscall mkdir
    npm ERR! path /usr/local/lib/node_modules/nodemon
    npm ERR! errno -13
    npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'
    npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'] {
    npm ERR! errno: -13,
    npm ERR! code: 'EACCES',
    npm ERR! syscall: 'mkdir',
    npm ERR! path: '/usr/local/lib/node_modules/nodemon'
    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/jasonmoon/.npm/_logs/2022-06-12T08_08_56_314Z-debug-0.log
    jasonmoon@Jasons-MacBook-Pro-2 nodeJS %

     

    처음에 설치할땐 문제가 없다가 이제서야 권한이 없다고 에러가 뜨는것같아서 

    sudo 어쩌고 저쩌고로 경로 입력해도 별반응이 없는것같은데 어떻게 해야할까요 ?

    #36068

    Heok Joon
    참가자

    jasonmoon@Jasons-MacBook-Pro-2 nodeJS % corepack enable
    Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
    Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
     

    yarn도 권한없음으로 다운을 못받고 위에 방식을 적용해도 별 소용이 없네요 구글엔 어떻게 검색해야 할까요?

    #36070

    Heok Joon
    참가자

    Change your file permissions... Like this

    First check who owns the directory

    ls -la /usr/local/lib/node_modules

    it is denying access because the node_module folder is owned by root

    drwxr-xr-x 3 root wheel 102 Jun 24 23:24 node_modules

    so this needs to be changed by changing root to your user but first run command below to check your current user How do I get the name of the active user via the command line in OS X?

    id -un OR whoami

    Then change owner

    sudo chown -R [owner]:[owner] /usr/local/lib/node_modules

    OR

    sudo chown -R ownerName: /usr/local/lib/node_modules

    OR

    sudo chown -R $USER /usr/local/lib/node_modules

     

    뭐이런식으로 오너가 바뀌면 가능하다던데 가능할법한 이야기인가요 ??

    #36084

    codingapple
    키 마스터

    네 권한없다는 폴더에 권한주면 됩니다

    아니면 sudo npm install 어쩌구 이런 식으로 입력해도 됩니다 

4 글 보임 - 1 에서 4 까지 (총 4 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠