Skip to content

gyp: Undefined variable napi_build_version in binding.gyp while trying to load binding.gyp #1359

Closed
@baobao12356

Description

@baobao12356

执行
node-gyp rebuild --target=5.0.2 --arch=ia32 --target_platform=win32 --dist-url=https://atom.io/download/electron/ --module_name=node_sqlite3 --module_path=../lib/binding/electron-v5.0-win32-ia32
报错如下:

gyp: Undefined variable napi_build_version in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\shzto\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:350:16)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\shzto\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=7.1.2" "--arch=ia32" "--target_platform=win32" "--dist-url=https://atom.io/download/electron/" "--module_name=node_sqlite3" "--module_path=../lib/binding/electron-v7.1-win32-ia32"
gyp ERR! cwd D:\xaingmu\gitlab\im-web\im-desktop\node_modules\sqlite3
gyp ERR! node -v v11.4.0
gyp ERR! node-gyp -v v7.0.0
gyp ERR! not ok

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions