Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Variable replacer does not take dotenv variables into account

See original GitHub issue
GET {{Url}}

The line above errors when Url is a dotenv variable. I added a breakpoint to the javascriptVariableReplacer function and inspected the context parameter. Sure enough, config-file variables were present in context.variables, but dotenv variables were not.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

fredrikhrcommented, Nov 9, 2021

Yeah, totally right. Okay PR coming up 😃

fredrikhrcommented, Nov 9, 2021

AH! The error occurs in getEnviromentConfig! If the config argument is specified it is merged in after the loaded config from the found rootDir of the httpFile.

Because of the following config initialize for the CLI, the envDirName get a value of env.

Read more comments on GitHub >

github_iconTop Results From Across the Web

After I get all variables that inside .env file how to replace the ...
parsed that is returned by dotenv.config is what was loaded from your path ( .env ) and does not take into account what's...
Read more >
How to update or reload env variables ? · Issue #122 - GitHub
I have a task using grunt-text-replace that replace some variable inside my .env file from users prompts. After the file .env has been ......
Read more >
Manage Environment Variables in your NodeJs Application ...
We will use the dotenv module to load environment variables from the .env file into process.env. Setup start script in package.json. Replace the ......
Read more >
Environment variables in Compose | Docker Documentation
Substitute environment variables in Compose files. If you have multiple environment variables, you can substitute them by adding them to a default environment...
Read more >
Using .env in .NET - Dusted Codes
init will run before I try to access the first env var, so I have to call DotEnv.init from the helper function which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found