自然语言设施的自然软件包未安装在流星软件包中

自然语言设施的自然软件包未安装在流星软件包中

问题描述:

我想在流星项目中为自然语言设施安装自然软件包.最初,我尝试使用此链接进行安装.它安装完美,但是当我运行我的应用程序时,出现错误:

I want to install natural package for natural language facility in a meteor project. Initially I tried to install using this link. It installed perfectly but when I ran my app, got error:

ReferenceErros:要求未定义

ReferenceErros:require is not defined

为此,我遵循了此链接 ANS解决方案并没有太大帮助. 然后,在谷歌搜索中发现需要在流星应用程序mrt add natural上安装自然软件包.链接为.

For this I followed this link ans solution not helped much. Then, found on googling that need to install natural package on meteor app, mrt add natural. The link for that is this.

但是当我使用此命令进行安装时,出现以下错误:

But when I am installing using this command, I got error as:

/usr/local/lib/node_modules/meteorite/lib/dependencies/package.js:106 throw('无法在路径中找到package.js'+ self.source.packagePa ^无法在路径中找到package.js /home/priya/.meteorite/packages/natural/NaturalNode/natural/d541ca394659521498ed36a7f6e03fef93163e53

/usr/local/lib/node_modules/meteorite/lib/dependencies/package.js:106 throw('Could not locate package.js within path ' + self.source.packagePa ^ Could not locate package.js within path /home/priya/.meteorite/packages/natural/NaturalNode/natural/d541ca394659521498ed36a7f6e03fef93163e53

请给出任何指示.我在此安装中停留了很多天.预先感谢

Please give any pointers. I am stuck in this installation for so many days. Thanks in advance

使用npm流星包比单独包装更好.这些以前是必需的,但现在无需使用它们,因此可以分别进行维护.

It's better to use npm meteor package than individual wrappers. Those were necessary before, but now there's no need to use them and thus maintain them separately.

首先,通过运行mrt add npm安装npm.

然后在项目目录中创建packages.json文件.在此处列出您的依赖项:

Then create packages.json file in your project directory. List your dependencies there:

{
  "natural": "0.1.27"
}

最后,使用Meteor.require进行访问:

var natural = Meteor.require('natural')