Ravenous Part 1 Error: SearchBar/BusinessList not defined

Hey all! I’m at the very end of Ravenous Part 1 - I’ve built my components and just finished updating App.js. But now I’m getting a failed to compile error:

./src/App.js  Line 11:10:  'SearchBar' is not defined     react/jsx-no-undef  Line 12:10:  'BusinessList' is not defined  react/jsx-no-undefSearch for the keywords to learn more about each error.

I’ve double and triple checked that my file path is correct when importing them into App.js and I’ve also double and triple checked that I’m exporting them at the bottom of BusinessList.js and SearchBar.js. What else could be causing this error to crop up?

Hi @rubyrunner76763 could you send the full source code for your project. Even just the App.js file is fine since it seems it is not being defined.

import React from 'react';
import './App.css';
import './components/BusinessList/BusinessList.js';
import './components/SearchBar/SearchBar.js';

class App extends React.Component {
      <div className="App">
        <SearchBar />
        <BusinessList />

export default App;

I figured it out! I wasn’t calling out the class itself during the import. It’s working now. Thanks.


No worries good luck on your journey :smiley: