Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with sharp module when trying to upload file #194

Closed
giuliostramondo opened this issue Feb 6, 2025 · 1 comment
Closed

Issue with sharp module when trying to upload file #194

giuliostramondo opened this issue Feb 6, 2025 · 1 comment

Comments

@giuliostramondo
Copy link

I am experiencing an error with a dependency called sharp that prevents me from performing a file upload using cli.

OS: Ubuntu 22.04
Node version: v23.7.0

Cli tool installed using sudo npm i -g @internxt/cli

Steps to reproduce:

  1. Perform login
  2. Issue a file upload command

internxt upload file

Output

    Error: Could not load the "sharp" module using the linux-x64 runtime
    Possible solutions:
    - Ensure optional dependencies can be installed:
        npm install --include=optional sharp
    - Ensure your package manager supports multi-platform installation:
        See https://sharp.pixelplumbing.com/install#cross-platform
    - Add platform-specific dependencies:
        npm install --os=linux --cpu=x64 sharp
    - Consult the installation documentation:
        See https://sharp.pixelplumbing.com/install

Expected

Not an error, possibly the chance to upload a file.

@giuliostramondo
Copy link
Author

The error above seems to have been the result of an inconsistent installation of nodejs.

sudo apt-get remove nodejs
sudo apt-get remove npm
# and all leftover files and folders if they exist
sudo rm -rf /usr/local/bin/npm 
sudo rm -rf /usr/local/share/man/man1/node* 
sudo rm -rf /usr/local/lib/dtrace/node.d
rm -rf ~/.npm
rm -rf ~/.node-gyp
sudo rm -rf /opt/local/bin/node
sudo rm -rf /opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/include/node*
sudo rm -rf /usr/local/bin/node*

  • Reinstalling from scratch nodejs
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
sudo -E bash nodesource_setup.sh
sudo apt-get install -y nodejs
npm install -g [email protected]
  • Reinstalling the cli
sudo npm install -g @internxt/cli

The error above disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant