neo4j-contrib / graphgist-portal-v3

GraphGist Portal v3 (JavaScript)
Apache License 2.0
5 stars 4 forks source link

Defer ImageKit initialization to make it possible to start the API (dev) without an ImageKit account #64

Closed ggrossetie closed 2 years ago

ggrossetie commented 2 years ago

Make it possible to start the API without an ImageKit public/private key. Otherwise, the api won't start:

/app/node_modules/imagekit/index.js:32
        throw new Error(errorMessages.MANDATORY_PUBLIC_KEY_MISSING.message);
        ^

Error: Missing publicKey during ImageKit initialization
    at new ImageKit (/app/node_modules/imagekit/index.js:32:15)
    at Object.<anonymous> (/app/build/images/imagekit.js:23:16)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/app/build/graphgists/mutations.js:10:17)
    at Module._compile (internal/modules/cjs/loader.js:999:30)