I am facing the following error while building on AWS amplify:
Syntax error: Cannot read property 'map' of undefined (0:undefined)
Here is my code:
import React from 'react';
import ReactDOM from 'react-dom';
export default class BusinessHTTPService {
static getBusinessList = () => {
return axios.get(`${API_BASE}business-categories/?`).then(response => response.data);
};
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>