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

228
Views
Error "Se esperaba una función de flecha después de la declaración de este parámetro de tipo"

Recibí este error mientras ejecutaba yarn start :

 $ yarn start yarn run v1.22.17 $ run-s build exec $ babel src/ -d lib/ SyntaxError: .../src/App.js: Expected an arrow function after this type parameter declaration. (8:9) 6 | 7 | export default function App(): React$MixedElement { > 8 | return <p>Hello, React!</p>; | ^ 9 | } 10 |

A continuación se muestran las configuraciones:

paquete.json

 "scripts": { "flow": "flow", "start": "run-s build exec", "exec": "node lib/index.js", "build": "babel src/ -d lib/", },

babel.config.json:

 { "presets": ["@babel/preset-flow"], "plugins": ["babel-plugin-transform-flow-enums"], "targets": { "esmodules": true } }

Aplicación.js:

 // @flow import "./App.css"; import React from "react"; export default function App(): React$MixedElement { return <p>Hello, React!</p>; }

¿Cuál es el problema con mis configuraciones y mi archivo de reacción?

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

0

Parece ser un error tipográfico en React.MixedElement , reemplace el $ por un . :

 export default function App(): React.MixedElement {...}
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!