Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error when a variable with the same name as expanded variable is declared #15

Open
hpedrorodrigues opened this issue Jun 3, 2024 · 0 comments · May be fixed by #17
Open

Fatal error when a variable with the same name as expanded variable is declared #15

hpedrorodrigues opened this issue Jun 3, 2024 · 0 comments · May be fixed by #17

Comments

@hpedrorodrigues
Copy link

hpedrorodrigues commented Jun 3, 2024

Hey 👋🏻

Context

A RangeError (more specifically Maximum call stack size exceeded) is raised when we declare a variable with the same name as the expanded variable.

e.g.,

MY_VAR=${MY_VAR}

If we change the value to something else. It works just fine.

This is an issue in dotenv-expand, and it was fixed in 11.0.0 (more details in the linked issues).

Description

Even though the issue is already fixed in dotenv-expand, we still use version 5.1.0 here.

"dotenv-expand": "5.1.0"

Also, since 5.1.0 is not compatible with version 11.0.0 (as expected 😅), we cannot force a resolution to 11.0.0 in the user project.

Solution

We need to bump dotenv-expand to at least 11.0.0 to fix this issue.

In the meantime, we can declare variables this way, and it should work:

MY_VAR='\${MY_VAR}'

Links


Not sure if I'm missing something here. So please let me know.

This was referenced Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant