julianhille / MuhammaraJS

Muhammara a node module with c/cpp bindings to modify PDF with js for node or electron (based/replacement on/of galkhana/hummusjs)
Other
228 stars 46 forks source link

npm install muhammara raises exceptions #356

Closed praEngineer closed 10 months ago

praEngineer commented 10 months ago

In my VS 2022 Package Manager Console, I raise the exception below when I execute 'npm install muhammara' One problem is reaching 148.82.113.4. When I ping 148.82.113.4, the response is time-out. I often use the Package Manager Console to install node libraries without exceptions like the one below.

npm : npm ERR! code 1 At line:1 char:1

npm ERR! path C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build ${EXTRA_NODE_PRE_GYP_FLAGS:-""}
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build=${EXTRA_NODE_PRE_GYP_FLAGS:-} 
--module=C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara\binding\muhammara.node --module_name=muhammara --module_path=C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara\binding 
--napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
npm ERR! node-pre-gyp info using node@18.16.1 | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara\binding\muhammara.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/julianhille/MuhammaraJS/releases/download/4.0.0/node-v108-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install request to https://github.com/julianhille/MuhammaraJS/releases/download/4.0.0/node-v108-win32-x64-unknown.tar.gz failed, reason: connect ETIMEDOUT 140.82.113.4:443 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for muhammara@4.0.0 and node@18.16.1 (node-v108 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error request to https://github.com/julianhille/MuhammaraJS/releases/download/4.0.0/node-v108-win32-x64-unknown.tar.gz failed, reason: connect ETIMEDOUT 140.82.113.4:443 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.16.1 | win32 | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.16.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.5 found at "C:\Users\sfarkas\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.16.1/node-v18.16.1-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.16.1/node-v18.16.1-headers.tar.gz failed, reason: connect ETIMEDOUT 104.20.23.46:443
npm ERR! gyp ERR! stack     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! gyp ERR! stack     at ClientRequest.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at TLSSocket.socketErrorListener (node:_http_client:502:9)
npm ERR! gyp ERR! stack     at TLSSocket.emit (node:events:525:35)
npm ERR! gyp ERR! stack     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! gyp ERR! stack     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build=${EXTRA_NODE_PRE_GYP_FLAGS:-}" 
"--module=C:\\work\\SN\\ApprovalMemoStamp\\ApprovalMemoStamp\\node_modules\\muhammara\\binding\\muhammara.node" "--module_name=muhammara" 
"--module_path=C:\\work\\SN\\ApprovalMemoStamp\\ApprovalMemoStamp\\node_modules\\muhammara\\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara
npm ERR! gyp ERR! node -v v18.16.1
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure 
--fallback-to-build=${EXTRA_NODE_PRE_GYP_FLAGS:-} --module=C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara\binding\muhammara.node --module_name=muhammara 
--module_path=C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\work\\SN\\ApprovalMemoStamp\\ApprovalMemoStamp\\node_modules\\muhammara\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" 
"--fallback-to-build" "${EXTRA_NODE_PRE_GYP_FLAGS:-}"
npm ERR! node-pre-gyp ERR! cwd C:\work\SN\ApprovalMemoStamp\ApprovalMemoStamp\node_modules\muhammara
npm ERR! node-pre-gyp ERR! node -v v18.16.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\sfarkas\AppData\Local\npm-cache\_logs\2023-11-16T18_47_41_989Z-debug-0.log
julianhille commented 10 months ago

This is nothing i can solve or is an issue on muhammara side.

The issue is that node-pre-gyp tries to download a pre built version directly from github.com releases. This obviously does not work as it timesout. The reason is a github OPs issue or some DNS / connectivity issue in between.

Im sorry but there is nothing i can do besides telling you, that you could compile it the files yourself.