I am developing a Node with GraphQL backend and just started working on the front end with create-react-app
.
It was going well until I added this code:
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './components/App';
import ApolloClient from 'apollo-boost';
import { ApolloProvider } from 'react-apollo';
const client = new ApolloClient({
uri: 'http://localhost:4444/graphql'
});
ReactDOM.render(
<ApolloProvider client={client}>
<App />
</ApolloProvider>, document.getElementById('root'));
The Apollo code is what broke it to where it is telling me require is not defined. I understand the error to be concerning the utilization of require statements on the browser side which I am not.