2013-09-29 1 views
0

NPM에 몇 가지 문제가있어서 Node, NPM & NVM을 제거한 다음 Mac OS X 10.8에서 모든 것을 다시 설치하기로 결정했습니다. 다양한 가이드와 Stackoverflow에 관한 질문을 한 후에 나는 모든 것을 없앴다고 확신했습니다. 하지만 처음 NVM을 설치 한 다음 노드 (NPM을 설치 한 노드)를 설치 한 후 놀랍게도 왜 npm -g ls을 실행하면 NPM 레지스트리에서 찾은 후 매우 기본적인 도우미가되고 다른 모듈을 많이 사용하는지 이해할 수 없었습니다. 다른 고급 모듈이 구축되는 상용구 모듈. 여기 밖으로 인쇄 모듈의 전체 목록은 다음과 같습니다NPM을 설치 한 후 특정 모듈을로드합니까 (자체 용도로 사용합니까?).

unknownd8a25e8b001d:~ [username]$ npm -g ls 
/Users/[username]/.nvm/v0.10.18/lib 
└─┬ [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├─┬ [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├─┬ [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├─┬ [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├─┬ [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├─┬ [email protected] 
    │ └─┬ [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── osenv[email protected] 
    ├─┬ [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├─┬ [email protected] 
    │ └─┬ [email protected] 
    │ └── [email protected] 
    ├─┬ [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├─┬ [email protected] 
    │ │ ├── [email protected] 
    │ │ └─┬ [email protected] 
    │ │ └── [email protected] 
    │ ├─┬ [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ └── [email protected] 
    │ ├─┬ [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ └── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├─┬ [email protected] 
    │ └── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    └── [email protected] 

가 설치 될 때 그래서 제 질문은, NPM가 사용하기위한 다양한 글로벌 모듈을 설치 않습니다입니까? 들여 쓰기에서 보았을 때, npm은 [email protected] 아래에 중첩되어 있기 때문에 npm이 사용하는 것처럼 보이고 Finder를 통해 NPM이 자신의 node_modules 폴더 내에서이를 어떻게 보이는지 확인할 수 있습니다.

답변

1

노드 패키지 관리자 (NPM) 자체는 모듈이며, 종속성이 있습니다. 따라서 질문에 대한 답은 예입니다. 단, 모듈은 전 세계적으로 의존성으로 설치되지 않습니다. NPM 모듈 자체는 전역 모듈입니다.

+0

그러면'npm -g ls' 명령으로 NPM의 종속성을 정확히 표시하는 이유는 무엇입니까? NPM이 글로벌 모듈이면, 자연스럽게 그 의존성과 함께 열거되지만, 글로벌 모듈 목록을 "클라우드"로 보인다는 것을 이해합니다. 나는 NPM의 의존성이 무엇인지 정확하게 알 수없는 한, NPM 모듈이 사용하는 것에 대해서는별로 신경 쓰지 않는다. –

+0

'npm -g ls' 명령은 시스템에 설치된 모듈 (및 그 의존성)을 전체적으로 설치 한 것을 보여줍니다. 다른 모듈을 설치하면 해당 목록에도 모듈이 표시됩니다. – hexacyanide

+0

자, 이제 익숙해 질 것입니다. 설치 한 모듈 만 보여줄 수있는 방법이 있습니까? NPM의 종속성을 제외 시키십시오. –

관련 문제