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

131
Views
importing sanityClient from client.js - Works in one place but not in another

Anyone have an idea about this.

I'm building a blog page which displays blogposts in a grid using React & Sanity & Tailwind.

One page displays the posts in a grid (Post.js) One page displays the individual posts clicked from the before mentioned grid (SinglePost.js)

both of these need to import sanityClient from "../client.js"

Post.js does this no problem and works just fine but SinglePost.js gives me an error saying:

./src/components/SinglePost.js
Attempted import error: 'sanityClient' is not exported from '../client.js'.

I don't understand how these two files pointing at exactly the same place can give completely contradictory results. One works, One says client.js isn't exporting sanityClient. Even when it definitly is.

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!