abagshaw abagshaw - 1 year ago 163
Node.js Question

Is is possible to install sharp for node.js without python?

I am needing to install

for node.js https://github.com/lovell/sharp but it appears that one of its dependencies (libvips) needs python (and so installation fails as I don't have python on my system and don't expect I'll be able to use python in my production environment).

I read that on the
github page it states "OS X, Windows (x64), Linux (x64, ARM) systems do not require the installation of any external runtime dependencies." so I'm not sure why I need python.

Answer Source

The sharp package uses node-gyp, which is a tool for "compiling native addon modules for Node.js." Typically native means C or C++ libraries like libvips. Python 2.7 is required for node-gyp to work as explained in the install docs. Despite sharp coming with prebuilt binaries, it still requires node-gyp (for now) as explained in this issue.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download