Question

I am trying to install the 'png' module from Node.js using the following command:

npm install png

however I am getting the following error:

node-waf configure build

'node-waf' is not recognized as an internal or external command

My question is: Is there node-waf for windows?

Was it helpful?

Solution

As of Node 0.8, the waf build system has been removed and replaced with the cross-platform node-gyp.

To get gyp running on Windows, you need Python 2.7 and MS Visual C++ (and for x64 builds, the Win 7 x64 SDK).

Of course, having gyp doesn't help you install the particular package you want (since it uses waf). Normally, you'd have to get the project's maintainer to upgrade to the new build system, or fork it and fix it yourself (it's not that hard).

However, it looks like the author of node-png in fact has added gyp bindings in the GitHub repo, but hasn't pushed those changes to npm (perhaps they don't work yet). You could try cloning the repo and seeing if you can get it to build.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top