在流星项目中安装自然节点时出错


I am working on a meteor project. Have to use natural package for natural language facility. I installed that using 'npm install natural'. But when ran the project, got error as 'ReferenceError: require is not defined'.
Added this line: var abc=Meteor.require('natural'); in the file in which have to use it. But when I am running the project, it is showing error as:=> Started proxy.
=> Meteor 0.8.1.3 is available. Update this project with 'meteor update'.
=> Started MongoDB.     
=> Errors prevented startup:
    While building package `router`:
    error: no such package: 'page-js-ie-support'
    error: no such package: 'HTML5-History-API'
-- When tried to install the above listed missing packages, showing error as: 
smart.json changed.. installing from smart.json, I got the following error after successfully installing various packages like natural, iron-router, paginated-subscription, router, accounts-ui-bootstrap-dropdown, spin. But after that showing following error. Why so?
/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

-- The packages in my project are: I don't understand here as router package is already listed then why showing error while running the project.??
 meteor list --using
standard-app-packages
bootstrap
router
accounts-ui-bootstrap-dropdown
accounts-password
spin
paginated-subscription
email
insecure
iron-router
npm
请给我指一下这个方向。这个错误变成了递归错误。在这个问题上我的头都破了,但还是卡住了。提前感谢

您有一个名为Natural(不确定是哪个)的包,该包没有按照正确的包规范构建或已以某种方式进行了修改。

这不是那么容易修复的,您必须联系包的作者来修复它或自己修改它。我在大气中找不到NaturalNode,所以它可能是一个定制包。

你可能想让你的应用程序的其余工作来调试修复它。要做到这一点,你需要删除这个包

删除~/.meteorite/packages中的文件和文件夹

仔细检查你的包裹。Json并删除有问题的包(自然)。并运行mrt update。并删除应用程序中与natural相关的其他代码,这些代码可能会阻止应用程序启动。

看起来你已经把https://github.com/NaturalNode/natural克隆成陨石了。你必须看看如何为meteor构建一个包。

你所使用的文件是一个npm模块,如果你把这些文件复制进来,就不能只和meteor一起工作。你必须制作一个兼容的陨石包才能工作。或者使用meteor-npm直接在你的应用中使用npm模块。

这个项目也可以帮助你作为一个例子,如何为npm模块制作一个包装器来使用meteor

最新更新