Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

Can't get runtime env variables anymore on Create-React-App 2.0 #131

Closed
@arik-gamerlink

Description

@arik-gamerlink

Hi,

I've recently been using this buildpack. I took note that runtime env variables wouldn't be possible without the "@mars/heroku-js-runtime-env" dependecy. So I installed it and wrote something like;

import runtimeEnv from '@mars/heroku-js-runtime-env'; const env = runtimeEnv(); export const serverUrl = env.REACT_APP_BACKEND_API || 'https://backend-staging.herokuapp.com/';

It worked great for a while, and now I seem to be getting an error;

Runtime env vars cannot be parsed. Content is {{REACT_APP_VARS_AS_JSON_______…

I believe this happened right after upgrading to create-react-app 2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions