Skip to content

.env variables are undefined in production #705

@rianfloo

Description

@rianfloo

Hello :)

I developed a plugin and try to submit to review but I've got a Javascript error in production mode.

It works perfectly in development but not in production mode.

Here is the log I've got on Heroku:

2022-02-14T17:46:30.225357+00:00 app[web.1]: SCOPES: process.env.SCOPES.split(","),
2022-02-14T17:46:30.225357+00:00 app[web.1]: ^
2022-02-14T17:46:30.225358+00:00 app[web.1]:
2022-02-14T17:46:30.225358+00:00 app[web.1]: TypeError: Cannot read properties of undefined (reading 'split')

My .env is filled.
When I console.log process.env, I've got and object but its not containing SCOPES and other variables inside my .env file.

Any ideas why?

Thanks a looot! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions