{"action":"opened","issue":{"url":"https://api.github.com/repos/arangodb/arangodb/issues/5485","repository_url":"https://api.github.com/repos/arangodb/arangodb","labels_url":"https://api.github.com/repos/arangodb/arangodb/issues/5485/labels{/name}","comments_url":"https://api.github.com/repos/arangodb/arangodb/issues/5485/comments","events_url":"https://api.github.com/repos/arangodb/arangodb/issues/5485/events","html_url":"https://github.com/arangodb/arangodb/issues/5485","id":327326280,"number":5485,"title":"Unable to import custom file using relative import in foxx","user":{"login":"dilipvamsi","id":16288600,"avatar_url":"https://avatars2.githubusercontent.com/u/16288600?v=4","gravatar_id":"","url":"https://api.github.com/users/dilipvamsi","html_url":"https://github.com/dilipvamsi","followers_url":"https://api.github.com/users/dilipvamsi/followers","following_url":"https://api.github.com/users/dilipvamsi/following{/other_user}","gists_url":"https://api.github.com/users/dilipvamsi/gists{/gist_id}","starred_url":"https://api.github.com/users/dilipvamsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilipvamsi/subscriptions","organizations_url":"https://api.github.com/users/dilipvamsi/orgs","repos_url":"https://api.github.com/users/dilipvamsi/repos","events_url":"https://api.github.com/users/dilipvamsi/events{/privacy}","received_events_url":"https://api.github.com/users/dilipvamsi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-29T13:41:49Z","updated_at":"2018-05-29T13:41:49Z","closed_at":null,"author_association":"NONE","body":"## my environment running ArangoDB\r\nI'm using the latest ArangoDB of the respective release series:\r\n- [ ] 2.8\r\n- [ ] 3.0\r\n- [ ] 3.1\r\n- [ ] 3.2\r\n- [x] 3.3\r\n- [ ] self-compiled devel branch\r\n\r\nMode:\r\n- [ ] Cluster\r\n- [x] Single-Server\r\n\r\nStorage-Engine:\r\n- [x] mmfiles\r\n- [ ] rocksdb\r\n\r\nOn this operating system:\r\n- [ ] DCOS on\r\n  - [ ] AWS\r\n  - [ ] Azure\r\n  - [ ] own infrastructure\r\n- [x] Linux \r\n  - [ ] Debian .deb\r\n  - [ ] Ubuntu .deb\r\n  - [ ] SUSE   .rpm\r\n  - [ ] RedHat .rpm\r\n  - [ ] Fedora .rpm\r\n  - [ ] Gentoo\r\n  - [ ] docker - official docker library\r\n  - [ ] other:\r\n- [ ] Windows, version: \r\n- [ ] MacOS, version:\r\n\r\n### Foxx\r\n\r\nI have written the validator file which uses **joi** internally in **api/validate.js** seems to be working on all my input and output example test cases.\r\nBut when I'm trying to import in **api/event_handler.js** I'm getting the following error.\r\nIs there a problem with the relative import with foxx.\r\n\r\nMy project tree\r\n```\r\n.\r\n├── api\r\n│   ├── event_handler.js\r\n│   └── validate.js\r\n├── index.js\r\n├── manifest.json\r\n├── README.md\r\n├── scripts\r\n└── test\r\n```\r\nErrors from /var/log/arangodb3/arangod.log\r\n```\r\n2018-05-29T13:28:12Z [674] ERROR Service \"/event-handler\" encountered an error while being mounted @ /var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/event_handler.js:9:18\r\n2018-05-29T13:28:12Z [674] ERROR    7 | module.exports = router;\r\n2018-05-29T13:28:12Z [674] ERROR    8 | \r\n2018-05-29T13:28:12Z [674] ERROR >  9 | const validate = require('./validate');\r\n2018-05-29T13:28:12Z [674] ERROR      |                  ^\r\n2018-05-29T13:28:12Z [674] ERROR   10 | \r\n2018-05-29T13:28:12Z [674] ERROR   11 | router.use((req, res, next) => {\r\n2018-05-29T13:28:12Z [674] ERROR   12 |   // Manipulate req here before it is handled by a route via ArangoError: failed to invoke module\r\n2018-05-29T13:28:12Z [674] ERROR File: /var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/validate.js\r\n2018-05-29T13:28:12Z [674] ERROR Line: 233\r\n2018-05-29T13:28:12Z [674] ERROR Column: 0\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:559:11)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n2018-05-29T13:28:12Z [674] ERROR     at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:98:21)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.<anonymous> (/var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/event_handler.js:9:18)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module._compile (/usr/share/arangodb3/js/common/bootstrap/modules.js:601:8)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.Module._extensions..js (/usr/share/arangodb3/js/common/bootstrap/modules.js:619:12)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:542:36)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n2018-05-29T13:28:12Z [674] ERROR     at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:98:21)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.<anonymous> (/var/lib/arangodb3-apps/_db/test-db/event-handler/APP/index.js:3:38) via SyntaxError: Unexpected token export\r\n2018-05-29T13:28:12Z [674] ERROR     at Module._compile (/usr/share/arangodb3/js/common/bootstrap/modules.js:595:23)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.Module._extensions..js (/usr/share/arangodb3/js/common/bootstrap/modules.js:619:12)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:542:36)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n2018-05-29T13:28:12Z [674] ERROR     at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:98:21)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.<anonymous> (/var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/event_handler.js:9:18)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module._compile (/usr/share/arangodb3/js/common/bootstrap/modules.js:601:8)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.Module._extensions..js (/usr/share/arangodb3/js/common/bootstrap/modules.js:619:12)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:542:36)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n2018-05-29T13:28:12Z [674] ERROR @ /var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/event_handler.js:9:18\r\n2018-05-29T13:28:12Z [674] ERROR    7 | module.exports = router;\r\n2018-05-29T13:28:12Z [674] ERROR    8 |\r\n2018-05-29T13:28:12Z [674] ERROR >  9 | const validate = require('./validate');\r\n2018-05-29T13:28:12Z [674] ERROR      |                  ^\r\n2018-05-29T13:28:12Z [674] ERROR   10 |\r\n2018-05-29T13:28:12Z [674] ERROR   11 | router.use((req, res, next) => {\r\n2018-05-29T13:28:12Z [674] ERROR   12 |   // Manipulate req here before it is handled by a route ArangoError 3103: failed to invoke module\r\n2018-05-29T13:28:12Z [674] ERROR File: /var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/validate.js\r\n2018-05-29T13:28:12Z [674] ERROR Line: 233\r\n2018-05-29T13:28:12Z [674] ERROR Column: 0\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:559:11)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n2018-05-29T13:28:12Z [674] ERROR     at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:98:21)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.<anonymous> (/var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/event_handler.js:9:18)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module._compile (/usr/share/arangodb3/js/common/bootstrap/modules.js:601:8)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.Module._extensions..js (/usr/share/arangodb3/js/common/bootstrap/modules.js:619:12)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:542:36)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n2018-05-29T13:28:12Z [674] ERROR     at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:98:21)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.<anonymous> (/var/lib/arangodb3-apps/_db/test-db/event-handler/APP/index.js:3:38) via SyntaxError: Unexpected token export\r\n2018-05-29T13:28:12Z [674] ERROR     at Module._compile (/usr/share/arangodb3/js/common/bootstrap/modules.js:595:23)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.Module._extensions..js (/usr/share/arangodb3/js/common/bootstrap/modules.js:619:12)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:542:36)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n2018-05-29T13:28:12Z [674] ERROR     at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:98:21)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.<anonymous> (/var/lib/arangodb3-apps/_db/test-db/event-handler/APP/api/event_handler.js:9:18)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module._compile (/usr/share/arangodb3/js/common/bootstrap/modules.js:601:8)\r\n2018-05-29T13:28:12Z [674] ERROR     at Object.Module._extensions..js (/usr/share/arangodb3/js/common/bootstrap/modules.js:619:12)\r\n2018-05-29T13:28:12Z [674] ERROR     at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:542:36)\r\n2018-05-29T13:28:12Z [674] ERROR     at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:487:16)\r\n```\r\n\r\nThanks,\r\nDilip Vamsi."}}
{"actor":{"display_login":"dilipvamsi"}}