Search code examples
node.jsweb-servicesnpmhttpservernpm-install

http-server-usr/bin/env : node : no such file or directory


When I type the http-server command getting this error showing that usr/bin/env : node : no such file or directory . Why getting this problem. How can i solve this?


Solution

  • This solution worked for me: Thread from askubuntu.com.

    Ubuntu and some Linux distributions install node's interpreter as /usr/bin/nodejs, and not /usr/local/bin/node.

    You can solve this issue installing the nodejs-legacy package which creates a symlink from /usr/bin/nodejs to /usr/bin/node.

    Solution:

    sudo apt-get install nodejs-legacy