Error: Cannot find module 'express'
모듈을 -g 로 설치했는데 모듈을 못찾는 경우가 있습니다.
$ node meadowlark.js
module.js:339
throw err;
^
Error: Cannot find module 'express'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/home/kagla/www/nodejs/web/ch05/meadowlark.js:1:77)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
이때는 /usr/local/lib/load_modules 의 심볼릭 링크를 /usr/local/lib/node 로 하나 생성합니다.
ln -s /usr/local/lib/node_modules /usr/local/lib/node
그럼 정상적으로 실행이 될것 입니다.
$ node meadowlark.js
Express started on http://localhost:3000; press Ctrl-C to terminate.
댓글 1개
게시판 목록
Node.js
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 25 | 9년 전 | 3769 | ||
| 24 |
|
9년 전 | 2495 | |
| 23 | 9년 전 | 2556 | ||
| 22 | 9년 전 | 7025 | ||
| 21 | 9년 전 | 2400 | ||
| 20 |
|
9년 전 | 2258 | |
| 19 | 9년 전 | 2092 | ||
| 18 | 9년 전 | 3809 | ||
| 17 | 9년 전 | 2502 | ||
| 16 | 9년 전 | 2421 | ||
| 15 | 9년 전 | 2055 | ||
| 14 | 9년 전 | 3136 | ||
| 13 | 9년 전 | 1971 | ||
| 12 | 9년 전 | 2539 | ||
| 11 | 9년 전 | 2753 | ||
| 10 | 9년 전 | 2033 | ||
| 9 | 9년 전 | 2280 | ||
| 8 |
거북이개발자
|
9년 전 | 1854 | |
| 7 | 9년 전 | 2146 | ||
| 6 | 9년 전 | 2468 | ||
| 5 | 10년 전 | 1541 | ||
| 4 |
프로그래머7
|
10년 전 | 1624 | |
| 3 | 10년 전 | 1575 | ||
| 2 |
|
10년 전 | 1458 | |
| 1 | 10년 전 | 1479 | ||
| 0 | 10년 전 | 1392 | ||
| -1 | 10년 전 | 1429 | ||
| -2 | 10년 전 | 1271 | ||
| -3 | 10년 전 | 1266 | ||
| -4 | 10년 전 | 1685 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기