idrinth-api-bench/issues

Bug: npm install fails with C++/nodegyp errors

Open

#1,123 opened on Jul 22, 2024

 (3 comments) (0 reactions) (0 assignees) (51 forks)auto 404
bugcomponent: frameworkeffort: intermediatehelp wantedimpact: largesize: M

Repository metrics

Stars
 (52 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the quickstart.
  2. Run npx -p @idrinth-api-bench/cli iabmp
  3. Run cd benchmark
  4. Run npm install
  5. See the error like below in the logs.

Expected behavior

npm install should be able to install the dependencies.

Screenshots

No screenshot, but here is the log from npm install.

❯ npm install
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm ERR! code 1
npm ERR! path /Users/nicktaylor/dev/streams/stream-with-idrinth/benchmark/node_modules/msnodesqlv8
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! ACTION binding_gyp_sqlserverv8_target_print_variables src/BeginTranOperation.cpp
npm ERR! cflags_cpp gnu++17 | arch: arm64 | link_path: -L/opt/homebrew/lib -L/usr/lib -L. | msodbc_include_folders  | fileset src/BeginTranOperation.cpp src/BinaryColumn.cpp src/BoundDatum.cpp src/BoundDatumSet.cpp src/CancelOperation.cpp src/CloseOperation.cpp src/CollectOperation.cpp src/Column.cpp src/Connection.cpp src/ConnectionHandles.cpp src/EndTranOperation.cpp src/FreeStatementOperation.cpp src/MutateJS.cpp src/OdbcConnection.cpp src/OdbcConnectionBridge.cpp src/OdbcError.cpp src/OdbcHandle.cpp src/OdbcOperation.cpp src/OdbcStatement.cpp src/OdbcStatementCache.cpp src/OpenOperation.cpp src/Operation.cpp src/OperationManager.cpp src/PollingModeOperation.cpp src/PrepareOperation.cpp src/ProcedureOperation.cpp src/QueryOperation.cpp src/QueryOperationParams.cpp src/QueryPreparedOperation.cpp src/ReadColumnOperation.cpp src/ReadNextResultOperation.cpp src/ResultSet.cpp src/TimestampColumn.cpp src/UnbindOperation.cpp src/Utility.cpp src/addon.cpp src/bcp.cpp src/stdafx.cpp
npm ERR!   CXX(target) Release/obj.target/sqlserverv8/src/BeginTranOperation.o
npm ERR! prebuild-install warn install No prebuilt binaries found (target=22.0.0 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.1.0
npm ERR! gyp info using node@22.0.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.5 found at "/Users/nicktaylor/.pyenv/versions/3.11.5/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v22.0.0/node-v22.0.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v22.0.0/node-v22.0.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v22.0.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v22.0.0/SHASUMS256.txt
npm ERR! gyp info spawn /Users/nicktaylor/.pyenv/versions/3.11.5/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/nicktaylor/.nvm/versions/node/v22.0.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/nicktaylor/dev/streams/stream-with-idrinth/benchmark/node_modules/msnodesqlv8/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/nicktaylor/.nvm/versions/node/v22.0.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/nicktaylor/Library/Caches/node-gyp/22.0.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/nicktaylor/Library/Caches/node-gyp/22.0.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/nicktaylor/.nvm/versions/node/v22.0.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/nicktaylor/Library/Caches/node-gyp/22.0.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/nicktaylor/dev/streams/stream-with-idrinth/benchmark/node_modules/msnodesqlv8',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/BeginTranOperation.cpp:1:
npm ERR! In file included from ../src/OdbcConnection.h:22:
npm ERR! ../src/stdafx.h:41:14: fatal error: 'msodbcsql.h' file not found
npm ERR!     #include <msodbcsql.h>
npm ERR!              ^~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sqlserverv8/src/BeginTranOperation.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/Users/nicktaylor/.nvm/versions/node/v22.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Darwin 23.5.0
npm ERR! gyp ERR! command "/Users/nicktaylor/.nvm/versions/node/v22.0.0/bin/node" "/Users/nicktaylor/.nvm/versions/node/v22.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/nicktaylor/dev/streams/stream-with-idrinth/benchmark/node_modules/msnodesqlv8
npm ERR! gyp ERR! node -v v22.0.0
npm ERR! gyp ERR! node-gyp -v v10.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/nicktaylor/.npm/_logs/2024-07-22T16_45_10_131Z-debug-0.log

System

please complete the following information:

  • OS: macOS Sonoma 14.5
  • Version Node 20 or Node 22

Additional context

Here's where it happened on the live stream with @Idrinth, https://www.youtube.com/watch?v=W9XuBZsh78A

Contributor guide