Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

357
Views
export 'default' (reexported as 'Navbar') was not found in './Navbar/Navbar'

The error persists , I don't know how to solve it because im new to React. I tried some answers on stack overflow but they don't seem to work, maybe I lack the knowledge to see what is causing the error.

Here is the code that's causing the error:

export { default as Navbar} from './Navbar/Navbar';
export { default as Products} from './Products/Product';

Here is the Navbar.jsx code:

import React  from 'react';
import { AppBar, Toolbar, IconButton, Badge, MenuItem, Menu, Typography } from '@material-ui/core';
import { ShoppingCart } from '@material-ui/icons';
import logo from '../../assets/logo.jpg';


import useStyles from './styles';

const Navbar=() => {
    const classes = useSyles();
  return (
   <>
  <AppBar position="fixed" className={classes.appBar} color="inherit">
    <Toolbar>
        <Typography variant="h6" className={classes.title} color="inherit">
            <img src={logo} alt="Commerce.js" height="25px" className={classes.image} />
              Commerce.js
           </Typography>

        <div className={classes.grow} />

            <div className={classes.button}>
              <iconButton aria-label="Show cart items" color="inherit" >

              </iconButton>
              <Badge badgeContent={2} color="secondary" >

                <ShoppingCart/>
              </Badge>

              </div>
      </Toolbar>

      </AppBar>

</>

)


}

Here is how it looks inside Visual Code: Inside Visual Studio

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

change const Navbar=() => {

to export default const Navbar=() => {

about 4 years ago · Juan Pablo Isaza Report

0

You are missing exporting those components as default. Please add

export default Navbar to the Navbar.js file. export default Products to the Products.js file.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!