[npm install]Error: EACCES: permission denied, access '/user/local/lib/node_modules'


 

이제 막 시작인데.. npm 설치 시작부터 오류가 주르륵 뜬다. 역시 뭔말인지 모르므로 구글링...

맥북에서의 npm 설치는 관리자권한 설정이 필요한 경우가 있기 때문에 무작정 install 을 했다가는 이런 오류가 뜨게 된다. 간단한 방법은 설치명령어 앞에 sudo를 붙여주는 것이다. 관리자권한을 주는 방법들도 있지만 난 그냥 이 방법으로 하기로 했다.

npm에 이어 expo-cli 설치시에도 "sudo npm install -g expo-cli" 라고 명령하면 무사히 expo도 설치된다. 물론 이 모든 과정은 터미널에서 진행한다.

+++++

It's just starting.. Errors are popping up from the start of npm installation.
I don't know what you're talking about, so I googled it...
Since npm installation on MacBook sometimes requires administrator rights settings, this error will appear if you try to install blindly. A simple way is to prefix the installation command with 'sudo'. There are ways to give administrator rights, but I just decided to do it this way.
When installing expo-cli following npm, command "sudo npm install -g expo-cli" to install expo safely. Of course, all of this is done in the terminal.

댓글

이 블로그의 인기 게시물

[R studio] pkg 설치 오류시 대처법

[Apple Developer 조치 필요: Distribution 인증서가 30일 후에 만료됨] 메일이 왔을때 대처법

[Unable to find bundled Java version =>Mac Flutter Android Studio Arctic Fox 2020.3.1] flutter doctor -v 실행시 안드로이드 스튜디오 오류 메시지 해결