티스토리 뷰
extraneous ?
사전적인 정의로 '관계 없는' 이라는 뜻의 영어 단어이다.
npm install -> npm list
npm install 로 websocket module 인 'ws'를 설치했다.
npm list 를 타이핑 했더니 아래와 같은 결과가 노출되며, websocket이 동작되지 않았다.
[root@localhost gchat]# npm list
npm WARN npm npm does not support Node.js v0.10.46
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
marlboroyw@1.0.0 /home/yw/gchat
├── ejs@2.4.2
├─┬ express@4.13.4
└── ws@2.2.0 extraneous
굵게 표시된 것과 같이, 다른 모듈과는 달리
extraneous 라는 태그가 하나 더 붙어있다.
제대로 설치 되지 않았다는 의미이다.
왜?
왜 이런 현상이 발생되는 것인가?
간단하게 말하자면, package.json 에 의존성으로 등록되지 않고,
npm install 로 강제로 설치했기 때문이다.
npm install [모듈명] --save
우리는 아래와 같은 flag를 통해서 npm install 후 package.json 에 의존성 모듈로 등록 할 수 있다.
문법
npm install [모듈명] --save
예제
npm install ws --save
'Computer > node.js' 카테고리의 다른 글
The server closed the connection. (0) | 2019.12.24 |
---|---|
nodejs+express+socket.io ) 채팅방 구현하기 (4) | 2017.03.07 |
node.js ) 9일차 - https (ssl) 달기 (0) | 2017.02.15 |
node.js ) 8일차 - DB 이용해보기 - SELECT (MySQL) (0) | 2017.01.10 |
node.js ) 7일차 - Express Framework ' Hello World ' (0) | 2017.01.09 |
- Total
- Today
- Yesterday
- git hub
- C언어
- 배열
- Node
- Swift
- mysql
- 안드로이드
- 깃헙
- CentOS
- 리눅스
- php
- node.js
- 서버
- linux
- 앵커브리핑
- 스위프트
- nodejs
- 노드
- 점유율
- 뉴스룸
- Android
- BBC 가쉽
- 손석희
- Kotlin
- IOS
- Asterisk
- C
- GIT
- xcode
- Phaser
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |