Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Customizing Your Project

Still Having Failed to Compile Error

Having issues with this Project Compiling here is my code

App.js .

import React, { Component } from 'react';
import { Container, Jumbotron } from 'react-bootstrap';

class App extends Component {
 render() {
    return (
      <div>
        {/* Adds the Jumbotron to Header */}
        <Jumbotron>
          <Container>
            <h1>Search App</h1>
            <p>This is a simple search app</p>
          </Container>
        </Jumbotron>
      </div>
    );
  }
}

export default App;

Index.js

import React from 'react';
import ReactDOM from 'react-dom';
// imports REACTBootstrap
import 'bootstrap/dist/css/bootstrap.css';
import './index.css';
import App from './App';
// Imports the serviceWorker that will cache local dev environments
import * as serviceWorker from './serviceWorker';

ReactDOM.render(<App />, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();

1 Answer

HI Greg

What is the compilation error you are receiving?

Check these screen shots out

Failed to compile.

./src/App.js
Module not found: Can't resolve 'react-bootstrap' in '/Users/user/Documents/Github/CodeLouisville_JS-React/UsingCreateReactApp/search-app/src'

I fixed the Issue by reinstalling react-bootstrap from the main documentation site