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

354
Views
SyntaxError: Exportación con nombre 'ApolloClient' no encontrada

Estoy tratando de crear un servidor con ApolloClient y GraphQL pero obtuve el siguiente error:

SyntaxError: no se encontró la exportación con nombre 'ApolloClient'. El módulo solicitado '@apollo/client' es un módulo CommonJS, que puede no admitir todas las exportaciones de módulos como exportaciones con nombre.

mi código se ve así:

 import { ApolloClient, InMemoryCache, createHttpLink } from '@apollo/client' const httpLink = createHttpLink({ uri: 'http://localhost:4000/graphql', }) const createApolloClient = () => { return new ApolloClient({ link: httpLink, cache: new InMemoryCache(), }) } export default createApolloClient

Lo intenté

 import pkg from '@apollo/client' const { ApolloClient, InMemoryCache, createHttpLink } = pkg

pero no ayudó

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!