Struggling to locate package despite successful installation

When attempting to execute expo optimize, an error message prompts the need for sharp-cli.

Following the guidance, sharp-cli is installed as directed.

To my dismay, the same error persists even after completing the installation step.

$ npm install -g <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="45362d2437356826292c05746b74756b75">[email protected]</a>
/Users/TuzMacbookPro2017/.npm-global/bin/sharp -> /Users/TuzMacbookPro2017/.npm-global/lib/node_modules/sharp-cli/bin/cli.js
+ <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8dfee5ecfffda0eee1e4cdbca3bcbda3bd">[email protected]</a>
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 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2b58434a595b064847426b1a051a1a060219494d4847342920266c4d52575448">[email protected]</a>`. 

For prerequisites, see: https://sharp.dimens.io/en/stable/install/#prerequisites
Set EXPO_DEBUG=true in your env to view the stack trace.

A previous workaround involved restarting the terminal, but unfortunately, this did not resolve the issue this time.

Furthermore, despite repeated installations of a new version, expo-cli continues to notify me of available updates whenever an expo command is run. It appears to be a recurring issue.

Even attempts to fix the problem by using yarn global add have proven unsuccessful.

Answer №1

Have you considered installing

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9be8f3fae9ebb6f8f7f2dbaab5aaabb5ab">[email protected]</a>
on your local machine?

npm install -S <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6112090013114c020d0821504f50514f51">[email protected]</a>

If that doesn't solve the issue, I recommend clearing your cache and attempting the installation again:

npm cache clean --force

This should hopefully resolve the problem!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is it advisable to run npm as a superuser?

Having issues with npm errors while attempting to install/update packages without superuser permissions on a Linux system. An alternative solution would be to run sudo npm install <package>, but I am hesitant about whether this is the best approach. ...

Having trouble installing NestJS due to the error message: "ERR_INVALID_OPT_VALUE" with a clear explanation of "re readableHighWaterMark

I am trying to install NestJs/cli on my Ubuntu 16.4 system by running the command below: npm install -g @nestjs/cli However, I encountered an error while doing so: 87 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@nestjs/cli" 8 ...

Is it possible to install the lib ldap-client module in node.js?

I'm having trouble installing the lib ldap-client package in Node.js. To try and solve this issue, I consulted the following page: https://github.com/nodejs/node-gyp. In an attempt to fix the problem, I have installed python, node-gyp, and Visual St ...

Building VSCode on Windows: A step-by-step guide

I am currently in the process of compiling https://github.com/Microsoft/vscode from the source code, but I am facing some challenges. After successfully running scripts\npm.bat install, I proceeded to run scripts\code.bat and a strange window app ...

Error encountered with the item properties in vue-simple-calendar 'classes'

For my Vue.js project, I am utilizing the npm calendar package called `vue-simple-calendar` and aiming to implement dynamic classes for each event item like background-color, etc. However, the `classes` property doesn't seem to be functioning as expec ...

My React application running on localhost is struggling to connect with the IPFS node

I'm currently working on a React component that allows users to submit a .jpeg file and upload it to IPFS. I've successfully started the daemon and can view the IPFS node in the IPFS-go-companion add-on with the following configurations: Gateway ...

Guide to declaring transitive package dependency when upgrading a package

During the process of updating packages with the ncu command in my Node.js project that utilizes npm, is there a way to specify upgrading all packages except for React 17 and any packages that rely on React 17? Essentially, I am looking to exclude a partic ...

Error in Laravel Mix Vuejs component: Syntax problem detected in <template />

My development environment involves Windows 10 OS and I have created a Laravel 8 project integrated with VueJs. However, when I try to access the file ./components/app.vue, it returns a SyntaxError: Unexpected token (1:0) The content of the app.vue file i ...

Encountered error code 3228369023 while trying to establish a connection to a SQL Server database using Node.js with MSSQL

Currently in the process of setting up an API for a SQL Server Express database, my plan is to utilize mssql in Node.js with express to handle requests and communicate with the database. Despite trying several methods to establish a connection between my n ...

What is the reason for using an outdated version of lodash in the code?

After successfully installing node on my Android phone using Termux, I decided to upgrade lodash globally to version 4. $ npm -v 5.6.0 $ node -v v8.9.2 $ npm i -g lodash + <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="19757 ...

Encountering "gyp ERR! find VS" error while installing npm in react-native

I had to transfer my react-native code from another PC, and when I attempted to run npm install, an error occurred. For a possible solution, you can check out this related answer: How can I solve the gyp error regarding msvs_version not being set? Please ...

What are some effective ways to handle ERR! EMFILE error of having excessive open files on a PA system?

Having trouble deploying my React application on PythonAnywhere. Encountering the following error while trying to install dependencies using npm i: npm ERR! EMFILE: too many open files Currently using a paid account with ulimit -a displaying open files ...

What is the process for modifying the output format of npm ls?

My client is requesting the dependencies of our projects, including the library name and github/NPM URL. Currently, I am using 'npm ll' command to retrieve this information for each project, but the output is in a tree structure. Is there a way t ...

When I try to run npm run build in a Vagrant environment on Windows 10, I receive an error message saying "rimraf: not found"

I am attempting to run a webpack project in Vagrant (on Windows 10) with an embedded Ubuntu 16.04 virtual machine. Successfully installed npm 5.6.0 and nodejs v8.9.4. After running npm install for dependencies, encountered the following errors : ... gyp ...

NodeJS - alternative HTML-PDF npm package

Looking for an alternative solution to convert static HTML code to a PDF in nodejs, as the current method using the html-pdf npm package poses a critical security vulnerability. Is there another package out there that can perform this task safely on the ...

Is there a way to send a file with React? Or are there similar methods like `npm unload` for Express?

Is there a way to send files using React similar to express' sendFile method? For example, in express, sending an .exe file would prompt a download, a PDF file would be displayed in the browser, and an image file would also be displayed. I'm curi ...

The server is unable to locate the command "wsgi serve" in the serverless environment

When attempting to start the server by running 'sls wsgi serve', I encountered an issue. Despite installing it with npm i serverless-wsgi and sls plugin install -n serverless-wsgi, the message "Successfully installed "serverless-wsgi@latest ...

React encountered an unexpected termination of JSON input during parsing

Upon running npm install, I encountered an error that is shown in the following link: https://i.stack.imgur.com/nVvps.jpg This issue has been causing trouble for me today and I'm unsure of the reason behind it. ...

Client-side libraries need to be installed via npm in a NodeJS environment

Currently, I am facing an issue with a nodejs application that needs to serve js assets to the client. After installing modules via npm (such as primus or socket.io), I aim to transmit these js files to the browser. If I use jade and have a public folder ...

Unfortunately, bower-rails is no longer able to install any packages

For some unknown reason, a current project installed with bower-rails cannot perform bower:install anymore! Even though it was working previously and I already have packages installed locally, now I am experiencing issues. No changes have been made! I at ...