问题
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