권한 설정

Npm 의 디렉토리 위치 찾기

$ npm config get prefix

 

출력이 "/usr/local"  이면 아래 명령어를 실행하여 권한을 설정

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

  - lib/node_modules,bin,share  <- 이 부분은 원하는 폴더로 변경가능

   >> $ sudo chown -R root:$(whoami) /usr/local/lib/node_modules/

추가로 가능한 권한을 설정해 줄 수 있다.

sudo chmod -R 775 /usr/local/lib/node_modules/

775에 대한 내용은 여기 참고 

nest 설치

 

$ npm i -g @nestjs/cli # Nest 프로젝트를 간편하게 생성할 수 있게 도와주는 라이브러리
$ nest new my-web-server # my-web-server(프로젝트 이름)이라는 이름으로 Nest 프로젝트를 생성

 

 

참고자료

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

 

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

https://docs.nestjs.com/first-steps

 

Documentation | NestJS - A progressive Node.js framework

Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Rea

docs.nestjs.com

https://stackoverflow.com/questions/49679808/error-eacces-permission-denied-mkdir-usr-local-lib-node-modules-node-sass-b

'프로그래밍 > Nest.js' 카테고리의 다른 글

[ NestJS ] Providers  (0) 2024.04.18
[NestJS] TypeORM 설정방법  (0) 2024.04.17
[ NestJS] DTO?  (0) 2024.04.17
[ NestJS ] Controllers  (0) 2024.04.15
[ NestJS ] 시작하기  (0) 2024.04.15

+ Recent posts