当尝试在带有Xcode 3.2的mac os x 10.6.6上安装npm时,我得到了以下错误。我该如何解决这个问题?
MacPro:juggernaut fred$ curl http://npmjs.org/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3902 100 3902
我想为服务器端的javascript使用一些特性。我认为prototype正在检查浏览器类型,但node.js当然不是浏览器。我得到以下错误:
$ node
> require('./prototype') ;
ReferenceError: navigator is not defined
at /home/guest/projects/javascript/prototype.js:14:5
at Object.<anonymous> (/home/guest/projects/javascript/prototype.js:23:4)