During installation, you may encounter an error like the following:
The libraries that do the actual image processing are written in low-level languages such as C++. These need to be compiled. The sharp library does a fantastic job of trying to provide pre-built binaries for your platform and Node.js version, however, if you are using a new Node.js version or an unusual platform, sharp will attempt to automatically compile the source on your system to create a compatible binary.
IPP tries to provide a hassle-free and easily reproducible installation, but due to the favoured performance of compiled languages, this will likely be an issue for some time (until WebAssembly matures enough).
If you do not need a cutting-edge version of Node.js, downgrading to an LTS (Long Term Support) version of Node.js may solve the problem. These versions are more stable and will likely have pre-compiled binaries already available for sharp.
Read back the full error to get an idea of what you need to complete the installation. Unfortunately, the resolution of this problem is operating system dependent. It's highly recommended to refer to node-gyp's documentation on how to set up the environment for each platform.
If you see an error like the above, you need to install a version of Python on your system. Instructions for your operating system can be found on their website.
If you see an error like the above, you need to install a C++ compiler. There is no official compiler and several options exist. On Windows, the recommended compiler is MSVC, on macOS it's clang, on on Linux it's gcc.
@ipp/primitive package uses a Go-compiled binary. Go is usually very well behaved, and
binaries for each system are bundled with the library. If you runtime problems, you can try
installing Go on your system, removing the vendor directory from the package and then running
prepack npm script.
The CLI package uses ink to handle dynamic terminal rendering for a better experience.
If your terminal does not support cursor positioning or is bugging out for some reason, you may try switching to the Text UI designed for non-interactive terminals that do not support modifications to the output.
--text CLI flag.
Some package managers such as yarn have very explicit dependency requirements. The
package dynamically imports pipes based ont he given configuration. You may need to explicitly add
these pipes as a package extension of
IPP uses React and Ink to render the terminal view by default. If you're installing IPP in a project that already uses a version of React, there may be a dependency version conflict, especially with new versions of React. The npm package manager is not able install two different versions of a dependency.
Either run IPP using the
--text flag to use a simple text renderer instead, or try downgrading
your React version to one that is supported by Ink.
If you think it's a bug, open a new issue at out GitHub repository.