title: when I fetch API_URL from .env as an environment variable, I get an error. I have dotenv installed
body: <p>.env</p>
  <pre><code>REACT_APP_MAPBOX_ACCESS_TOKEN=mytoken
  API_URL=http://localhost:1377
  </code></pre>
  <p>.js</p>
  <pre><code>// const API_URL = &quot;http://localhost:1337&quot;;
  
  export async function listLogEntries() {
    const response = await fetch(`${process.env.API_URL}/api/routes`);
    return response.json();
  }
  
  export async function createLogEntry(entry) {
    const response = await fetch(`${process.env.API_URL}/api/routes`, {
      method: &quot;POST&quot;,
      headers: {
        &quot;content-type&quot;: &quot;application/json&quot;,
      },
      body: JSON.stringify(entry),
    });
    return response.json();
  }
  </code></pre>
  <p>When I fetch API_URL from .env file I get an error: <strong>Uncaught (in promise) SyntaxError: Unexpected token &lt; in JSON at position 0</strong></p>
  <p>But If I use API_URL right away from .js file</p>
  <pre><code>const API_URL = &quot;http://localhost:1337&quot;;
  export async function listLogEntries() {
    const response = await fetch(`${API_URL}/api/routes`);
    return response.json();
  }
  
  export async function createLogEntry(entry) {
    const response = await fetch(`${API_URL}/api/routes`, {
      method: &quot;POST&quot;,
      headers: {
        &quot;content-type&quot;: &quot;application/json&quot;,
      },
      body: JSON.stringify(entry),
    });
    return response.json();
  }
  </code></pre>
  <p>I don't get that error and my app work as well</p>