Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5057

Keep getting Error: Configuration property "vidly_jwtPrivateKey" is not defined

$
0
0

Error Screenshot[ I am using Node.js and have already set the enviroment varibale vidly_jwtPrivateKey. and try to retrieve it using config package using this command config.get('vidly_jwtPrivateKey')but i keep getting this error :

throw new Error('Configuration property "'+ property +'" is not defined'); Error: Configuration property "vidly_jwtPrivateKey" is not defined,

i have been searching for hours , could you please suggest a solution.

here is what my default.json file contains :

{"jwtPrivateKey" : ""}

and custom-environment-variables.json contain :

{"jwtPrivateKey" : "vidly_jwtPrivateKey"}

and i have already set vidly_jwtPrivateKey by exporting it in terminal (I use a Mac):

export vidly_jwtPrivateKey=mySecureKey.

I have tried this , but it doesn't work :

Error: Configuration property "mongoURI" is not defined

Here is the code I am suing to retrieve the environment variable:

if (!config.get('vidly_jwtPrivateKey')){  console.error('FATAL ERROR : jwtPrivateKey is not defined '),  process.exit(1);};

Thanks a lot


Viewing all articles
Browse latest Browse all 5057

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>