프로젝트를 새로운 리눅스 환경에 옮기고 npm install를 하니 다음과 같은 문제 발생

 
neo@ubuntu:~/$ npm install
npm http GET https://registry.npmjs.org/body-parser
npm http GET https://registry.npmjs.org/cookie-parser
npm http GET https://registry.npmjs.org/express/3.0.5
npm http GET https://registry.npmjs.org/jade/0.30.0
npm http GET https://registry.npmjs.org/socket.io

npm ERR! Error: failed to fetch from registry: jade/0.30.0
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
중략...
npm not ok
 

아래와 같이 해결

 
neo@ubuntu:~/$ sudo apt-get purge nodejs npm 
neo@ubuntu:~/$ curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get install -y nodejs
 
설정 방법은 아주 간단하다. 

아래 내용에 해당되는 곳에 ico 파일을 넣어주면 express가 구동될 때 자동으로 웹 페이지에 파비콘을 설정한 채로 실행이 된다.

 
var favicon = require('serve-favicon');
app.use(favicon(path.join(__dirname, 'public/images', 'favicon.ico')));
 



+ Recent posts