question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Something went wrong installing the "sharp" module

See original GitHub issue

Description:

i’m use ionic cordova resources ios --force command if ionic-cli 5.0.2 will be error Something went wrong installing the “sharp” module but ionic-cli 4.12.0 is ok

Steps to Reproduce:

Output:

D:\WEB\ConsentApp>ionic cordova resources ios --force

cordova-res.cmd ios [cordova-res] [cordova-res] Something went wrong installing the “sharp” module [cordova-res] [cordova-res] The specified module could not be found. [cordova-res] \?\D:\WEB\ConsentApp\node_modules\sharp\build\Release\sharp.node [cordova-res] [cordova-res] - Remove the “node_modules/sharp” directory, run “npm install” and look for errors [cordova-res] - Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/ [cordova-res] - Search for this error at https://github.com/lovell/sharp/issues [cordova-res] [ERROR] An error occurred while running subprocess cordova-res.

    cordova-res.cmd ios exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

My ionic info:

<paste here>

Other Information:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

77reactions
imhoffdcommented, Jun 15, 2019

This isn’t really a bug in Ionic CLI. You’ll have to fix the installation of sharp, which is the image processing dependency of cordova-res. I noticed you have the tool installed in your project, which isn’t our recommended strategy.

Install it globally:

  1. First, remove it from your project: npm uninstall cordova-res
  2. Install globally: npm install -g cordova-res

Here are some more things you can try (keep in mind you will need the -g flag in npm for working with global installations):

Also, you can pass the --no-cordova-res flag to use the old method (remote resource generation).

22reactions
awaism551commented, Feb 8, 2020

sudo npm uninstall cordova-res && sudo npm install -g cordova-res --unsafe-perm=true

Read more comments on GitHub >

github_iconTop Results From Across the Web

Something went wrong installing the "sharp" module #24559
Had node 8 installed when I first noticed the error. Upgraded to 12, cleared npm cache npm cache clear and gatsby cache gatsby...
Read more >
10 Answers - 10 - Stack Overflow
Something went wrong installing the "sharp " module Cannot find module '../build/Release/sharp.node'. How can I fix this problem? react-native ...
Read more >
Something went wrong installing the "sharp" module (fix)
I was using Node version v14. 14.0 when I got the sharp module error and downgraded to several earlier versions without luck. Then...
Read more >
Something went wrong installing the "sharp" module - Questions
Hi everyone, I always get the error below when I install framework7. I am using nodejs version v14.15.0. Here is the error I...
Read more >
To reproduce - The freeCodeCamp Forum
Something went wrong installing the "sharp " module Cannot find module '../build/Release/sharp-linux-x64.node' on Ubuntu.
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 Reddit Thread

No results found

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