When i run NPM install on a project that is trying to install duckDb version 1.1.3 i get the following error
npm error code 1
npm error path C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm error Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding\duckdb.node --module_name=duckdb --module_path=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding --napi_version=9
--node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v127' (1)
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using [email protected]
npm error node-pre-gyp info using [email protected] | win32 | x64
npm error (node:24828) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error node-pre-gyp info check checked for "C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding\duckdb.node" (not found)
npm error node-pre-gyp http GET .1.3-node-v127-win32-x64.tar.gznpm error node-pre-gyp ERR! install request to .1.3-node-v127-win32-x64.tar.gz failed, reason: self-signed certificate in certificate chain
npm error node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v127 ABI, unknown) (falling back to source compile with node-gyp)
npm error node-pre-gyp WARN Hit error request to .1.3-node-v127-win32-x64.tar.gz failed, reason: self-signed certificate in certificate chain
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info ok
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info find Python using Python version 3.13.1 found at "C:\Python313\python.exe"
npm error gyp http GET .13.1/node-v22.13.1-headers.tar.gz
npm error gyp http fetch GET .13.1/node-v22.13.1-headers.tar.gz attempt 1 failed with SELF_SIGNED_CERT_IN_CHAIN
npm error gyp WARN install got an error, rolling back install
npm error gyp ERR! configure error
npm error gyp ERR! stack FetchError: request to .13.1/node-v22.13.1-headers.tar.gz failed, reason: self-signed certificate in certificate chain
npm error gyp ERR! stack at ClientRequest.<anonymous> (C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm error gyp ERR! stack at ClientRequest.emit (node:events:524:28)
npm error gyp ERR! stack at emitErrorEvent (node:_http_client:104:11)
npm error gyp ERR! stack at _destroy (node:_http_client:898:9)
npm error gyp ERR! stack at onSocketNT (node:_http_client:918:5)
npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:91:21)
npm error gyp ERR! System Windows_NT 10.0.19045
npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Program Files (x86)\\SDADS\\WebApp\\backend\\node_modules\\duckdb\\lib\\binding\\duckdb.node" "--module_name=duckdb" "--module_path=C:\\Program Files (x86)\\SDADS\\WebApp\\backend\\node_modules\\duckdb\\lib\\binding" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v127"
npm error gyp ERR! cwd C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb
npm error gyp ERR! node -v v22.13.1
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok
npm error node-pre-gyp ERR! build error
npm error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding\duckdb.node --module_name=duckdb --module_path=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v127' (1)
npm error node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:524:28)
npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1101:16)
npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm error node-pre-gyp ERR! System Windows_NT 10.0.19045
npm error node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files (x86)\\SDADS\\WebApp\\backend\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm error node-pre-gyp ERR! cwd C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb
npm error node-pre-gyp ERR! node -v v22.13.1
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
ive tried reverting the version of NPM, ive tried reverting the version of NodeJS, not sure what else to try
im running NPM versin 11.1.0
any help would be greatly appreciated
When i run NPM install on a project that is trying to install duckDb version 1.1.3 i get the following error
npm error code 1
npm error path C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm error Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding\duckdb.node --module_name=duckdb --module_path=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding --napi_version=9
--node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v127' (1)
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using [email protected]
npm error node-pre-gyp info using [email protected] | win32 | x64
npm error (node:24828) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error node-pre-gyp info check checked for "C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding\duckdb.node" (not found)
npm error node-pre-gyp http GET https://npm.duckdb.org/duckdb/duckdb-v1.1.3-node-v127-win32-x64.tar.gznpm error node-pre-gyp ERR! install request to https://npm.duckdb.org/duckdb/duckdb-v1.1.3-node-v127-win32-x64.tar.gz failed, reason: self-signed certificate in certificate chain
npm error node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v127 ABI, unknown) (falling back to source compile with node-gyp)
npm error node-pre-gyp WARN Hit error request to https://npm.duckdb.org/duckdb/duckdb-v1.1.3-node-v127-win32-x64.tar.gz failed, reason: self-signed certificate in certificate chain
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info ok
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp info find Python using Python version 3.13.1 found at "C:\Python313\python.exe"
npm error gyp http GET https://nodejs.org/download/release/v22.13.1/node-v22.13.1-headers.tar.gz
npm error gyp http fetch GET https://nodejs.org/download/release/v22.13.1/node-v22.13.1-headers.tar.gz attempt 1 failed with SELF_SIGNED_CERT_IN_CHAIN
npm error gyp WARN install got an error, rolling back install
npm error gyp ERR! configure error
npm error gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v22.13.1/node-v22.13.1-headers.tar.gz failed, reason: self-signed certificate in certificate chain
npm error gyp ERR! stack at ClientRequest.<anonymous> (C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm error gyp ERR! stack at ClientRequest.emit (node:events:524:28)
npm error gyp ERR! stack at emitErrorEvent (node:_http_client:104:11)
npm error gyp ERR! stack at _destroy (node:_http_client:898:9)
npm error gyp ERR! stack at onSocketNT (node:_http_client:918:5)
npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:91:21)
npm error gyp ERR! System Windows_NT 10.0.19045
npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Program Files (x86)\\SDADS\\WebApp\\backend\\node_modules\\duckdb\\lib\\binding\\duckdb.node" "--module_name=duckdb" "--module_path=C:\\Program Files (x86)\\SDADS\\WebApp\\backend\\node_modules\\duckdb\\lib\\binding" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v127"
npm error gyp ERR! cwd C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb
npm error gyp ERR! node -v v22.13.1
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok
npm error node-pre-gyp ERR! build error
npm error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding\duckdb.node --module_name=duckdb --module_path=C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v127' (1)
npm error node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:524:28)
npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1101:16)
npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm error node-pre-gyp ERR! System Windows_NT 10.0.19045
npm error node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files (x86)\\SDADS\\WebApp\\backend\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm error node-pre-gyp ERR! cwd C:\Program Files (x86)\SDADS\WebApp\backend\node_modules\duckdb
npm error node-pre-gyp ERR! node -v v22.13.1
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
ive tried reverting the version of NPM, ive tried reverting the version of NodeJS, not sure what else to try
im running NPM versin 11.1.0
any help would be greatly appreciated
Share Improve this question asked Feb 7 at 14:07 danCodesdanCodes 256 bronze badges1 Answer
Reset to default 2As the error message suggests, you can set the environment variable NODE_TLS_REJECT_UNAUTHORIZED
to "0". This tells Node.js to ignore certificate errors. This is a security risk, so only use it as a last resort or for temporary testing.
$env:NODE_TLS_REJECT_UNAUTHORIZED="0"
npm install
$env:NODE_TLS_REJECT_UNAUTHORIZED="" # Remove the variable after
Disabling certificate verification makes you vulnerable to man-in-the-middle attacks. An attacker could intercept your network traffic and inject malicious code.