2

I am getting;

  Encountered error "#<ExecJS::ProgramError: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.>

I only get it, once I switch to prerender:true, before that I was not getting any import related errors.

How could I debug this? What might be the cause of the problem?

The component throwing the error looks like:

import React from "react";
import { configureStore } from "@reduxjs/toolkit";
import { Provider } from 'react-redux'
import {
  myReducer,
} from "./redux/reducers/reducers";
import Main from "./Main";

const store = configureStore({
  reducer: {
    myReducer: myReducer,
  },
});

function App(props) {
  return (
    <Provider store={store}>
      <Main current_user={props.current_user}></Main>
    </Provider>
  );
}

export default App;
Gotey
  • 449
  • 4
  • 15
  • 41

0 Answers0