fiware-pep-proxy icon indicating copy to clipboard operation
fiware-pep-proxy copied to clipboard

Config folder missing for test

Open synergiator opened this issue 7 years ago • 3 comments

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'

synergiator avatar Jul 02 '18 11:07 synergiator

Hi

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

apozohue10 avatar Jul 09 '18 08:07 apozohue10

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

synergiator avatar Jul 09 '18 12:07 synergiator

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

jason-fox avatar Jan 27 '19 18:01 jason-fox