I can't seem to debug this... not sure what's wrong.

This is a React front-end communicating using AXIOS to a Java/MySQL backend. Axios is making CRUD requests over localhost to fetch/update data. 

When I run NPM START (development - port 3000) for my React application, it runs fine. However, when I run NPM RUN BUILD and then serve the production build (port 5000), I am getting the following error messages in the console:

```
Uncaught (in promise) TypeError: this.state.reportData.map is not a function
    at t.value (TotalsPerCustomer.js:378)
    at Oi (react-dom.production.min.js:3785)
    at Ni (react-dom.production.min.js:3776)
    at Ri (react-dom.production.min.js:3960)
    at Va (react-dom.production.min.js:5514)
    at Qa (react-dom.production.min.js:5536)
    at Ou (react-dom.production.min.js:5958)
    at Pu (react-dom.production.min.js:5925)
    at ku (react-dom.production.min.js:5860)
    at Ja (react-dom.production.min.js:5787)

```

I faced this ".map is not a function" previously when I wasn't properly using an ARRAY - but I know this isn't causing the issue now since it works fine on development (Port 3000).

I've tried to do some research on why this is occurring but haven't found any clear answers. 

I have added "localhost:5000" to the allowed Origins for CORS in Java back end:

```
package com.example.groupproject;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication
public class GroupProjectApplication {

    public static void main(String[] args) {
        SpringApplication.run(GroupProjectApplication.class, args);
    }

    @Bean
    public WebMvcConfigurer corsConfigurer() {
        return new WebMvcConfigurer() {
            @Override
            public void addCorsMappings(CorsRegistry registry) {
                registry.addMapping("/**").allowedOrigins("http://localhost:3000","http://localhost:3001","http://localhost:5000");
            }
        };
    }
}

```

I think I need to understand better what is occurring when a production build is created - I know it creates an minified version of the code -- does this mean that if I have functions named the same thing in different React components then it will create an issue? 

Do I need to add the axios dependency somewhere in my WebPack folder? Or is there a different dependency or something missing in my WebPack?

See below screenshot of the console:   

[![enter image description here](https://i.stack.imgur.com/BpKJx.png)](https://i.stack.imgur.com/BpKJx.png)

I don't really know how to begin debugging using these console errors - can someone shed some light on this?

My apologies for being a little clueless on this production build - any help is much appreciated.

Thanks!