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

How to add path to .env file and use it?

$
0
0

I wanted to put the path in here:

const serviceAccount = require("./service_account.json");

into a .env file like this:

PATH="./service_account.json"

and getting the like this:

require('dotenv').config();const serviceAccount = require(process.env.PATH);

error:

Error: Cannot find module 'C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\LINQPad5;C:\Program Files\nodejs\;C:\Users\santo\AppData\Local\Microsoft\WindowsApps;C:\Users\santo\.dotnet\tools;C:\Users\santo\AppData\Local\Programs\Fiddler;C:\Users\santo\AppData\Roaming\npm'Require stack:- C:\internal_bestmposlite-dashboard\BestMPOS-Lite\list_user_data.js

Viewing all articles
Browse latest Browse all 5054

Trending Articles



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