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

479
Views
Unable to import 'sharp' into next.js project. "Module not found: Can't resolve 'child_process'"

I am trying to import and use sharp in my Next.js project. I have tried uninstalling and reinstalling sharp many times but every time I run npm run dev, this is the error I get.

./node_modules/detect-libc/lib/detect-libc.js:3:0
Module not found: Can't resolve 'child_process'

Import trace for requested module:
./node_modules/sharp/lib/utility.js
./node_modules/sharp/lib/index.js
./pages/index.js

https://nextjs.org/docs/messages/module-not-found

For reference this is the code that is causing the error:

import sharp from "sharp";

I have also tried this code, with no success:

const sharp = require('sharp');

Every other dependency I have installed works except for sharp.

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!