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

425
Views
ReactJS/NextJS - npm run build fails - SyntaxError: Unexpected token 'export'

When running "npm run build" I'm getting the following error:

> Build error occurred
C:\Users\...\project\nextjs-frontend\node_modules\mui-rte\index.js:1
export {default} from './dist/MUIRichTextEditor'
^^^^^^
SyntaxError: Unexpected token 'export'

node_modules/mui-rte/index.js just contains

export {default} from './dist/MUIRichTextEditor'

However with npm run build my project works just fine and I can use MUIRichTextEditor.

enter image description here

<MUIRichTextEditor
                label="Type something here..."
                onSave={save}
                onChange={handleEditorChange}
                defaultValue={defaultDescValue}
                inlineToolbar={false}
                controls={[
                  "title",
                  "bold",
                  "italic",
                  "underline",
                  "numberList",
                  "bulletList",
                  "quote",
                ]}
              />

The build error is preventing me from updating the production version. Does anyone know why I'm getting the export error?

about 4 years ago · Juan Pablo Isaza
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!