TimelordUK / node-sqlserver-v8

branched from node-sqlserver, SQL server driver compatible with all versions of Node
Other
135 stars 43 forks source link

install msnodesqlv8 through npm failed #293

Closed carltin0315 closed 1 year ago

carltin0315 commented 1 year ago

My node version is v18, and I'm running npm i msnodesqlv8.

Here is the error part of the log:

error code 1 242 error path C:\Users\T11242DTD\Documents\GitHub\emsdhome-staff-advanced-search\node_modules\msnodesqlv8 243 error command failed 244 error command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild 245 error prebuild-install warn install self-signed certificate in certificate chain 245 error gyp info it worked if it ends with ok 245 error gyp info using node-gyp@9.3.1 245 error gyp info using node@18.16.0 | win32 | x64 245 error gyp info find Python using Python version 3.11.3 found at "C:\Users\T11242DTD\AppData\Local\Programs\Python\Python311\python.exe" 245 error gyp http GET https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz 245 error gyp WARN install got an error, rolling back install 245 error gyp ERR! configure error 245 error gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz failed, reason: self-signed certificate in certificate chain 245 error gyp ERR! stack at ClientRequest. (C:\Users\T11242DTD\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\minipass-fetch\lib\index.js:130:14) 245 error gyp ERR! stack at ClientRequest.emit (node:events:513:28) 245 error gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:502:9) 245 error gyp ERR! stack at TLSSocket.emit (node:events:513:28) 245 error gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8) 245 error gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3) 245 error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 245 error gyp ERR! System Windows_NT 10.0.19044 245 error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\T11242DTD\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" 245 error gyp ERR! cwd C:\Users\T11242DTD\Documents\GitHub\emsdhome-staff-advanced-search\node_modules\msnodesqlv8 245 error gyp ERR! node -v v18.16.0 245 error gyp ERR! node-gyp -v v9.3.1 245 error gyp ERR! not ok 246 verbose exit 1

I did try to install the previous version like 3.1 & 2.1 but it still give me the same error. Please help me to solve this.

sespinoza-dev commented 1 year ago

My node version is v18, and I'm running npm i msnodesqlv8.

Here is the error part of the log:

error code 1 242 error path C:\Users\T11242DTD\Documents\GitHub\emsdhome-staff-advanced-search\node_modules\msnodesqlv8 243 error command failed 244 error command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild 245 error prebuild-install warn install self-signed certificate in certificate chain 245 error gyp info it worked if it ends with ok 245 error gyp info using node-gyp@9.3.1 245 error gyp info using node@18.16.0 | win32 | x64 245 error gyp info find Python using Python version 3.11.3 found at "C:\Users\T11242DTD\AppData\Local\Programs\Python\Python311\python.exe" 245 error gyp http GET https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz 245 error gyp WARN install got an error, rolling back install 245 error gyp ERR! configure error 245 error gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz failed, reason: self-signed certificate in certificate chain 245 error gyp ERR! stack at ClientRequest. (C:\Users\T11242DTD\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\minipass-fetch\lib\index.js:130:14) 245 error gyp ERR! stack at ClientRequest.emit (node:events:513:28) 245 error gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:502:9) 245 error gyp ERR! stack at TLSSocket.emit (node:events:513:28) 245 error gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8) 245 error gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3) 245 error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 245 error gyp ERR! System Windows_NT 10.0.19044 245 error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\T11242DTD\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" 245 error gyp ERR! cwd C:\Users\T11242DTD\Documents\GitHub\emsdhome-staff-advanced-search\node_modules\msnodesqlv8 245 error gyp ERR! node -v v18.16.0 245 error gyp ERR! node-gyp -v v9.3.1 245 error gyp ERR! not ok 246 verbose exit 1

I did try to install the previous version like 3.1 & 2.1 but it still give me the same error. Please help me to solve this.

I have the same issue in Mac Ventura 13.4, with npm v9.5.1, Nodejs v18.16.0, also tried with older npm versions.

[EDITED: SOLVED] What was the issue for me was Netscope Client, I disable it and I was able to install it. So it's most probably a network security issue.

Netscop Client is a security software that is designed to protect the system by monitoring and filtering network traffic. It's possible that Netscop Client was interfering with the network requests made by npm during the installation process, leading to the failure of fetching the necessary files from the npm registry.

TimelordUK commented 1 year ago

does this help

https://github.com/nodejs/node-gyp/issues/695

i.e. disable via NODE_TLS_REJECT_UNAUTHORIZED=0

are you inside a proxy or firewall - the library should in theory download the binary required for MacOS from git release page

for example can you from browser https://github.com/TimelordUK/node-sqlserver-v8/releases

get the binary from releases archive for darwin

in either case this is not an isue with msnodesqlv8 this is related to TLS / node-gyp it is essentially rejecting TLS due to fact you have a self certified certificate - for example this can also happening to the database where an additional parameter is required to allow such a connection.

On Thu, 15 Jun 2023 at 15:23, Sam @.***> wrote:

My node version is v18, and I'm running npm i msnodesqlv8.

Here is the error part of the log:

error code 1 242 error path C:\Users\T11242DTD\Documents\GitHub\emsdhome-staff-advanced-search\node_modules\msnodesqlv8 243 error command failed 244 error command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild 245 error prebuild-install warn install self-signed certificate in certificate chain 245 error gyp info it worked if it ends with ok 245 error gyp info using @. 245 error gyp info using @. | win32 | x64 245 error gyp info find Python using Python version 3.11.3 found at "C:\Users\T11242DTD\AppData\Local\Programs\Python\Python311\python.exe" 245 error gyp http GET https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz 245 error gyp WARN install got an error, rolling back install 245 error gyp ERR! configure error 245 error gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz failed, reason: self-signed certificate in certificate chain 245 error gyp ERR! stack at ClientRequest. (C:\Users\T11242DTD\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\minipass-fetch\lib\index.js:130:14) 245 error gyp ERR! stack at ClientRequest.emit (node:events:513:28) 245 error gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:502:9) 245 error gyp ERR! stack at TLSSocket.emit (node:events:513:28) 245 error gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8) 245 error gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3) 245 error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 245 error gyp ERR! System Windows_NT 10.0.19044 245 error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\T11242DTD\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" 245 error gyp ERR! cwd C:\Users\T11242DTD\Documents\GitHub\emsdhome-staff-advanced-search\node_modules\msnodesqlv8 245 error gyp ERR! node -v v18.16.0 245 error gyp ERR! node-gyp -v v9.3.1 245 error gyp ERR! not ok 246 verbose exit 1

I did try to install the previous version like 3.1 & 2.1 but it still give me the same error. Please help me to solve this.

I have the same issue in Mac Ventura 13.4, with npm v9.5.1, Nodejs v18.16.0, also tried with older npm versions, but the issue remains.

— Reply to this email directly, view it on GitHub https://github.com/TimelordUK/node-sqlserver-v8/issues/293#issuecomment-1593166944, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXWJG2G6YFRPO7YMG3BHSDXLMLG3ANCNFSM6AAAAAAZHSLDXU . You are receiving this because you are subscribed to this thread.Message ID: @.***>