I try to run expo optimize
and it says it requires sharp-cli
.
So I install sharp-cli
as it directs.
And then it gives me the same error.
(first step described above is left out)
$ npm install -g [email protected]
/Users/TuzMacbookPro2017/.npm-global/bin/sharp -> /Users/TuzMacbookPro2017/.npm-global/lib/node_modules/sharp-cli/bin/cli.js
+ [email protected]
updated 1 package in 24.632s
$ expo optimize
This will overwrite the original assets.
Optimizing assets...
Optimizing ./assets/electro-icon-1024.png
This command requires version 1.10.0 of `sharp-cli`.
You can install it using `npm install -g [email protected]`.
For prerequisites, see: https://sharp.dimens.io/en/stable/install/#prerequisites
Set EXPO_DEBUG=true in your env to view the stack trace.
This was happening before and I was able to fix it by restarting my terminal, or something like that. No such luck this time.
Also if it helps, expo-cli
tells me there's a new version when I run an expo
command, no matter how many times I install the new version. Similar problem, it seems.
Installing with yarn global add
didn't fix it either.