Sharp w/ React Native

See original GitHub issue

What are you trying to achieve?

I’m trying to use Sharp with my Expo React Native Application

Have you searched for similar questions?

Yes. I’ve seen people in the Issues page list things related to Expo and React Native, but I haven’t full understood how people are getting it to work.

What I’ve done is very simple so far:

In a terminal of your choice execute the following

# Select "Blank App" in Options
expo init App

# Move into App directory
cd app

# Install Sharp
npm install sharp --save

However, when actually trying to use Sharp I ran into multiple issues. I’ve had to install color-converter and events, but even after that I started getting the error Unable to resolve module util but to my knowledge that won’t be able to be resolved because of react native.

Is there an existing guide for using Sharp with React Native or with Expo?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
hengkxcommented, Aug 8, 2020

Are there any other libraries that can be used on RN?

3reactions
lovellcommented, May 28, 2020

This module requires a Node.js runtime. I think React Native uses Safari’s JavaScriptCore engine, which won’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I use Sharp image processing library in React js?
No. Sharp uses the node.js runtime as well as binary executable code that is installed on the host system. All this means that...
Read more >
React Native: potential fix for “sharp module” error - Techstacker
js. The fix I use that has worked every time is to remove node_modules inside your app root folder with this command: rm...
Read more >
sharp - npm
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images. Latest version: 0.31.3, ...
Read more >
react-native-vector-icons directory
react -native-vector-icons directory.. AntDesign.. stepforward ... 500px-with-circle.. add-to-list.. add-user ... arrow-with-circle-right.
Read more >
C# vs React Native Desktop | What are the differences?
C# (pronounced "See Sharp") is a simple, modern, object-oriented, ... React Native Desktop is an open source tool with 11.2K GitHub stars ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found