显示的npm安装不能调用未定义的方法'localeCompare'

首先,我安装了nodemailer,然后显示没有正确configuration。之后,我更新到nodemailer 0.7.1,然后显示无法findmimelib模块。然后,我尝试再次重新安装nodemailer,然后我显示下面的错误。这是为什么 ..? 当我尝试安装另一个library.It可能会发生。

npm ERR! Linux 3.19.0-15-generic npm ERR! argv "node" "/usr/bin/npm" "install" "nodemailer" npm ERR! node v0.10.25 npm ERR! npm v3.3.5 npm ERR! Cannot call method 'localeCompare' of undefined 

我尝试使用sudo关键字,并尝试全局安装,并更新所有的软件包,但它并没有帮助。

我认为你的问题是你使用的节点的版本太旧了。 我有这个问题,并用n来运行节点的多个版本。

以下是关于如何升级节点的选项链接