forseti-security/forseti-visualizer

Server Fails to Start (missing config.json)

Opened this issue · 3 comments

The server fails on startup as it tries to source a non-existent config.json.

It's looking for ./server/config.json which is sourced in ./server/index.js at 23: import config from './config.json'; But this is ignored in the .gitignore at 11 config.json.

Not sure what this is used for as there's no documentation, but without it this cannot be run.

The traceback:

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module './server/config.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/cooperpellaton/Documents/forseti-visualizer/forseti-api/server.js:21:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at loader (/Users/cooperpellaton/Documents/forseti-visualizer/forseti-api/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/cooperpellaton/Documents/forseti-visualizer/forseti-api/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[nodemon] app crashed - waiting for file changes before starting...

This will be resolved in an upcoming fairly large PR.

In the meantime, you can reference the README on the forseti-api page for getting around this:
https://github.com/forseti-security/forseti-visualizer/blob/master/forseti-api/README.md

Config.JSON will be removed in a future merge. If you have time, let me know if the updated instructions on this branch works:
https://github.com/forseti-security/forseti-visualizer/tree/cleanup-and-streamline

config.json issues should be resolved by #49 - the use of config.json has been deprecated.