Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config folder missing for test #50

Open
synergiator opened this issue Jul 2, 2018 · 3 comments
Open

Config folder missing for test #50

synergiator opened this issue Jul 2, 2018 · 3 comments

Comments

@synergiator
Copy link

synergiator commented Jul 2, 2018

Hi, as I run
(CI job @ travis https://travis-ci.com/fiware-qa/fiware-pep-proxy)
npm test

there is the following error:


module.js:549
    throw err;
    ^

Error: Cannot find module './../config'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/repo/sanity/test.js:4:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /repo/node_modules/mocha/lib/mocha.js:172:27
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/repo/node_modules/mocha/lib/mocha.js:169:14)
    at Mocha.run (/repo/node_modules/mocha/lib/mocha.js:356:31)
    at Object.<anonymous> (/repo/node_modules/mocha/bin/_mocha:366:16)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
npm ERR! Test failed.  See above for more details.
root@c8e951372251:/repo#  Cannot find module './../config'
@apozohue10
Copy link
Contributor

Hi

You have to duplicate config.template in config.js and configure as you need.

@synergiator
Copy link
Author

Hi, @apozohue10 , I've added this step to travis specs, but still get same error.
https://travis-ci.com/fiware-qa/fiware-pep-proxy/builds/78437532

@jason-fox
Copy link
Contributor

See: https://github.com/ging/fiware-pep-proxy/blob/5f4509db5ae4d3b1b64a58b18a5335d70d74edce/.gitignore

node_modules
config.js
cert

The presence of config.js in the .gitignore causes the module not to be found. There is a fix for this as part of #78 which came across the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants