I actually found the answer to this question already, and just want to document my finding.
First of all, this problem is not specific to building the leveldown module for Windows PouchDB. From what I have read online, it is a fairly common problem.
It has to do with the fact that nw-gyp somehow forgot the target version of NW between the nw-gyp configure
and nw-gyp build command
. When this happens, a TyperError: Invalid Version: undefined would be thrown.
The solution is actually very simple, all you need to do is to set --target=
again when you do nw-gyp build
, like this:
nw-gyp configure --target=0.47.0
nw-gyp build --target=0.47.0