natural package for natural language facility not getting installed in meteor package

风格不统一 提交于 2019-12-11 21:26:34

问题


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:require is not defined

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('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


回答1:


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.

First, instal npm by running mrt add npm.

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

{
  "natural": "0.1.27"
}

Finally, use Meteor.require to access it:

var natural = Meteor.require('natural')


来源:https://stackoverflow.com/questions/23956239/natural-package-for-natural-language-facility-not-getting-installed-in-meteor-pa

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!