Skip to content

nw-gyp failed with node 19.0.1 #155

Open
@onemen

Description

When I'm running node 19.0.1 on windows 11 (nw-gyp -v v3.6.6)

The command nw-gyp configure --release --target=0.70.1 --arch=x64 --python="c:/python2.7/python.exe" failed with error:
gyp: Undefined variable standalone_static_library in binding.gyp while trying to load binding.gyp

same result when running nw-gyp rebuild.

When i run the same command with node 18.12.1 it work.

binding.gyp:

{
  "targets": [
    {
      "target_name": "cityhash",
      "sources": [ "binding.cc", "mozilla/cityhash/city.cpp" ]
    }
  ]
}

console output:

gyp info it worked if it ends with ok
gyp info using nw-gyp@3.6.6
gyp info using node@19.0.1 | win32 | x64
gyp info find VS using VS2022 (17.3.32929.385) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python27\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Users\\USER_NAME\\AppData\\Local\\pnpm\\global\\5\\.pnpm\\nw-gyp@3.6.6\\node_modules\\nw-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\USER_NAME\\projects\\testing\\installer\\src\\cityhash\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\USER_NAME\\AppData\\Local\\pnpm\\global\\5\\.pnpm\\nw-gyp@3.6.6\\node_modules\\nw-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\USER_NAME\\.nw-gyp\\0.70.1\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\USER_NAME\\.nw-gyp\\0.70.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\USER_NAME\\AppData\\Local\\pnpm\\global\\5\\.pnpm\\nw-gyp@3.6.6\\node_modules\\nw-gyp',
gyp info spawn args   '-Dnode_lib_file="C:\\Users\\USER_NAME\\.nw-gyp\\0.70.1\\<(target_arch)\\node.lib"',
gyp info spawn args   '-Dnw_lib_file="C:\\Users\\USER_NAME\\.nw-gyp\\0.70.1\\<(target_arch)\\nw.lib"',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\USER_NAME\\projects\\testing\\installer\\src\\cityhash',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '-Dv13=1',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\USER_NAME\\projects\\testing\\installer\\src\\cityhash\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: Undefined variable standalone_static_library 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\USER_NAME\AppData\Local\pnpm\global\5\.pnpm\nw-gyp@3.6.6\node_modules\nw-gyp\lib\configure.js:367:16)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Windows_NT 10.0.22621
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\USER_NAME\\AppData\\Local\\pnpm\\global\\5\\node_modules\\nw-gyp\\bin\\nw-gyp.js" "configure" "--release" "--target=0.70.1" "--arch=x64" "--python=c:/python2.7/python.exe"
gyp ERR! cwd C:\Users\USER_NAME\projects\testing\installer\src\cityhash
gyp ERR! node -v v19.0.1
gyp ERR! nw-gyp -v v3.6.6
gyp ERR! not ok

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