简体   繁体   English

使用foxx Manager安装arrangoDB应用程序时出错

[英]Error while installing arrangoDB application using foxx manager

I have created EC2 instance on AWS with Ubuntu(14.04). 我已经使用Ubuntu(14.04)在AWS上创建了EC2实例。 I am trying to install arangodb application using foxx manager on this. 我正在尝试使用foxx manager安装arangodb应用程序。 I have connected to it using putty. 我已经用腻子连接了它。 I have installed the arangodb using sudo apt-get install arangodb. 我已经使用sudo apt-get install arangodb安装了arangodb。 I have also got project from git on ubuntu machine. 我也在ubuntu机器上从git获得了项目。 when I am trying to install application using foxx-manager install . 当我尝试使用foxx-manager install安装应用程序时 /DataSandbox it gives error as / DataSandbox它给出错误为

"StdOut: ArangoError 3103: failed to invoke module. “ StdOut:ArangoError 3103:无法调用模块。
File: /var/lib/arangodb-apps/_db/_system/DataSandbox/APP/controllers/Reports.js 文件:/var/lib/arangodb-apps/_db/_system/DataSandbox/APP/controllers/Reports.js
Cause: ArangoError 3100: cannot locate module 原因:ArangoError 3100:无法找到模块
File: repositories/Reports" 文件:存储库/报告”

When I check the file repositories/Reports it exists and when I check /var/lib/arangodb-apps path it is there until Datasandbox like /var/lib/arangodb-apps/_db/_system/DataSandbox/. 当我检查文件存储库/报表时,它存在,当我检查/ var / lib / arangodb-apps路径时,它一直存在,直到Datasandbox,如/ var / lib / arangodb-apps / _db / _system / DataSandbox /。 Datasandbox folder is empty in arangodb-apps. 在arangodb-apps中,Datasandbox文件夹为空。

Same process I did in different ubuntu machine which is not created from AWS. 我在不是从AWS创建的不同ubuntu机器中执行的过程相同。 On that it was got installed successfully. 到此,它已成功安装。

Can anyone please guide me on this error cannot locate module ? 谁能指导我这个错误找不到模块

Thanks in Advance. 提前致谢。

Can you clarify whether the two machines you saw different results on (ie the one it worked on and the one it didn't) were running the same version of ArangoDB and which version(s) you were using? 您能否澄清一下,您在两台计算机上看到不同结果的结果(即,它在哪台计算机上工作而没有在同一台计算机上)运行的是同一版本的ArangoDB,以及您使用的是哪个版本?

The error indicates there is a require call in controllers/Reports.js for repositories/Reports which could not be resolved. 该错误表明在controllers/Reports.js中存在无法解决的repositories/Reportsrequire调用。 If the machine it worked with was running an older version of ArangoDB it could be that you are being bit by the change in how require resolves certain names: https://www.arangodb.com/2015/11/foxx-module-resolution-will-change-in-2-8/ 如果一起工作的机器运行ArangoDB的旧版本,它可能是你正在如何改变位require解决某些名称: https://www.arangodb.com/2015/11/foxx-module-resolution -将会-变化-在-2-8 /

I think you literally have an expression like this in your controller: 我认为您在控制器中确实有一个这样的表达式:

require('repositories/Reports')

This doesn't work in 2.8 and later as it will attempt to find a (third-party or ArangoDB) module called "repositories/Reports" and fails. 这在2.8及更高版本中不起作用,因为它将尝试查找名为“存储库/报告”的(第三方或ArangoDB)模块,并且失败。

Instead that should be a relative path from the controller file to the repository file: 而是应该是从控制器文件到存储库文件的相对路径:

require('../repositories/Reports')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM