2014-11-24 64 views
1

不知道如果我错过了什么,我已经安装了NPMElasticsearch使用JavaScript的NodeJS不安装

npm install elasticsearch 

我本来期望的elasticsearch文件夹在我的node_modules下最新的,但它显示为elasticsearch浏览器。我相信它们是相同的代码,所以我没有太惊慌。

在我的节点代码:

var elasticsearch = require('elasticsearch-browser'); 

我得到一个错误:

Dev/node_modules/elasticsearch-browser/elasticsearch.js:20281 var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : funct ^TypeError: undefined is not a function

我错过了一些东西明显?

回答

0

好吧,对不起 - 不知道如何或为什么,但我再次安装,并得到了实际的elasticsearch节点库,一切都很好,与世界。