nodejs 설치후 $ node app.js 등과 같이 app을 실행시킬때 다음과 같은 에러가 발생하는 경우가 있다.

  •  /usr/bin/env: node: No such file or directory

원인은 node 명령이 등록이 되지않아서 인데, 실제로 nodejs 라는 명령으로 실행하면 실행이 된다.


이때는 다음과 같이 nodejs의 심볼릭 링크를 만들어 주면 된다.

  • $ ln -s /usr/bin/nodejs /usr/local/bin/node

이후 $ node app.js 명령이 실행이 된다.


참고: https://github.com/nodejs/node-v0.x-archive/issues/3911

'Node.js' 카테고리의 다른 글

[Node.js][Winston] Log File Managment  (0) 2017.02.03
[Node.js][Winston] Custom Log Format  (0) 2017.02.03
[Node.js] NVM을 통한 nodejs 설치  (0) 2016.12.21
[BOWER] Proxy 설정  (0) 2016.12.16
[NPM] Proxy 설정  (1) 2016.12.16
Posted by leechwin
,

Javascript 내의 function 들의 성능 체크를 위해 시간을 측정하는 여러 방법에 대해 알아본다.


Performance.now()

var t0 = performance.now();
doSomething();
var t1 = performance.now();
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.");


Console.time() - Non-standard

console.time('performance');
doSomething();
console.timeEnd('performance');

참조: http://stackoverflow.com/questions/313893/how-to-measure-time-taken-by-a-function-to-execute



Posted by leechwin
,