简体   繁体   中英

Invalid Version TypeError when using nw-gyp to build the leveldown module for Windows PouchDB

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM