I was trying to access the commercejs Library's Public Key in React. But i failed to do so and met with this error. I can't understand why i am getting this error.

src\lib\commerce.js

```
import Commerce from '@chec/commerce.js';

export const commerce = new Commerce(process.env.REACT_APP_CHEC_PUBLIC_KEY, true);

```

src\App.js

```
import React, {useState, useEffect} from 'react';
import {Products, Navbar} from './components';
import {commerce} from './lib/commerce';
const App = () => {

    const [products, setProducts] = useState([]);

    const fetchProducts = async () => {
        const {data} = await commerce.products.list();

        setProducts(data);
    }

    useEffect(() => {
        fetchProducts();
    })

    console.log(products);

    return (
        <div>
            <Navbar/>
            <Products/>
        </div>
    )
}

export default App;

```

**Error**

TypeError: t is undefined
e
node\_modules/@chec/commerce.js/lib/index.js:1