Uncaught ReferenceError: Component not defined in Meteor
10,972
Your routes.js
file is lacking the import of Deal
component.
make sure you have this line in route.js
:
import Deal from './path/to/Deal.js';
Author by
cala
Diving in to React & Redux, and learning how to implement new technologies along the way. Interested in using firebase, mongodb, express & node.
Updated on August 02, 2022Comments
-
cala almost 2 years
I'm trying to display my Deal component but I keep getting this error below.
I'm using Meteor with ReactJS.
Uncaught ReferenceError: Deal is not defined at meteorInstall.imports.routes.routes.js
Here is my routes.js file
<Route path="/deals" component={Deal} secure="auth" />
My Deal.js component file, that the route should be linking too.
import React from 'react'; import { Link } from 'react-router'; import PrivateHeaderNav from './PrivateHeaderNav.js' export default class Deal extends React.Component { render() { return ( <div className="content"> <PrivateHeaderNav/> Deal </div> ); }
}
Am I missing something in the imports or in my Deal component?
Thanks