httptoolkit / httptoolkit-server

The backend of HTTP Toolkit
https://httptoolkit.com
GNU Affero General Public License v3.0
433 stars 96 forks source link

Cant install #67

Closed bbdwbayu closed 1 year ago

bbdwbayu commented 1 year ago

Hello, i want to install this. pls help.

Windows PowerShell

Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\httptoolkit\httptoolkit-server> npm i npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated request-promise-native@1.0.5: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.3: this library is no longer supported npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! code 2 npm ERR! path C:\httptoolkit\httptoolkit-server\node_modules\node-datachannel npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || (npm install --ignore-scripts && npm run _prebuild) npm ERR! added 600 packages, removed 1 package, and audited 658 packages in 43s npm ERR! npm ERR! 68 packages are looking for funding npm ERR! run npm fund for details npm ERR! npm ERR! 4 high severity vulnerabilities npm ERR! npm ERR! To address all issues (including breaking changes), run: npm ERR! npm audit fix --force npm ERR! npm ERR! Run npm audit for details. npm ERR! npm ERR! > node-datachannel@0.3.4 _prebuild npm ERR! > prebuild --backend cmake-js npm ERR! npm ERR! [ npm ERR! 'C:\Program Files\nodejs\node.exe', npm ERR! 'C:\httptoolkit\httptoolkit-server\node_modules\node-datachannel\node_modules\cmake-js\bin\cmake-js', npm ERR! 'rebuild', npm ERR! '--runtime-version=18.12.1', npm ERR! '--arch=x64', npm ERR! '--runtime=node' npm ERR! ] npm ERR! Not searching for unused variables given on the command line. npm ERR! -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621. npm ERR! -- The C compiler identification is MSVC 19.29.30147.0 npm ERR! -- The CXX compiler identification is MSVC 19.29.30147.0 npm ERR! -- Detecting C compiler ABI info npm ERR! -- Detecting C compiler ABI info - done npm ERR! -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped npm ERR! -- Detecting C compile features npm ERR! -- Detecting C compile features - done npm ERR! -- Detecting CXX compiler ABI info npm ERR! -- Detecting CXX compiler ABI info - done npm ERR! -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped npm ERR! -- Detecting CXX compile features npm ERR! -- Detecting CXX compile features - done npm ERR! -- Configuring incomplete, errors occurred! npm ERR! See also "C:/httptoolkit/httptoolkit-server/node_modules/node-datachannel/build/CMakeFiles/CMakeOutput.log". npm ERR! prebuild-install WARN install No prebuilt binaries found (target=18.12.1 runtime=node arch=x64 libc= platform=win32) npm ERR! npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm ERR! npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm ERR! npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm ERR! npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm ERR! npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm ERR! prebuild info begin Prebuild version 11.0.4 npm ERR! prebuild info build Preparing to prebuild node-datachannel@0.3.4 for node 18.12.1 on win32-x64 using cmake-js npm ERR! info TOOL Using Visual Studio 16 2019 generator. npm ERR! info CMD CLEAN npm ERR! info RUN [ npm ERR! info RUN 'cmake', npm ERR! info RUN '-E', npm ERR! info RUN 'remove_directory', npm ERR! info RUN 'C:\httptoolkit\httptoolkit-server\node_modules\node-datachannel\build' npm ERR! info RUN ] npm ERR! info CMD CONFIGURE npm ERR! info RUN [ npm ERR! info RUN 'cmake', npm ERR! info RUN 'C:\httptoolkit\httptoolkit-server\node_modules\node-datachannel', npm ERR! info RUN '--no-warn-unused-cli', npm ERR! info RUN '-G', npm ERR! info RUN 'Visual Studio 16 2019', npm ERR! info RUN '-A', npm ERR! info RUN 'x64', npm ERR! info RUN '-DCMAKE_JS_VERSION=6.3.2', npm ERR! info RUN '-DCMAKE_BUILD_TYPE=Release', npm ERR! info RUN '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\httptoolkit\httptoolkit-server\node_modules\node-datachannel\build', npm ERR! info RUN '-DCMAKE_JS_INC=C:\Users\bayuf\.cmake-js\node-x64\v18.12.1\include\node;C:\httptoolkit\httptoolkit-server\node_modules\node-datachannel\node_modules\nan', npm ERR! info RUN '-DCMAKE_JS_SRC=C:/httptoolkit/httptoolkit-server/node_modules/node-datachannel/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc', npm ERR! info RUN '-DNODE_RUNTIME=node', npm ERR! info RUN '-DNODE_RUNTIMEVERSION=18.12.1', npm ERR! info RUN '-DNODE_ARCH=x64', npm ERR! info RUN '-DCMAKE_JS_LIB=C:\Users\bayuf\.cmake-js\node-x64\v18.12.1\win-x64\node.lib', npm ERR! info RUN '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE' npm ERR! info RUN ] npm ERR! CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): npm ERR! Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the npm ERR! system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY npm ERR! OPENSSL_INCLUDE_DIR) npm ERR! Call Stack (most recent call first): npm ERR! C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) npm ERR! C:/Program Files/CMake/share/cmake-3.25/Modules/FindOpenSSL.cmake:613 (find_package_handle_standard_args) npm ERR! CMakeLists.txt:26 (find_package) npm ERR! npm ERR! npm ERR! ERR! OMG Process terminated: 1 npm ERR! prebuild ERR! build Error: Failed to build cmake with exit code 1 npm ERR! prebuild ERR! build at ChildProcess. (C:\httptoolkit\httptoolkit-server\node_modules\node-datachannel\node_modules\prebuild\cmakebuild.js:32:19) npm ERR! prebuild ERR! build at ChildProcess.emit (node:events:513:28) npm ERR! prebuild ERR! build at ChildProcess._handle.onexit (node:internal/child_process:291:12)

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\bayuf\AppData\Local\npm-cache_logs\2022-12-15T07_49_45_639Z-debug-0.log

and this same with the UI

pimterry commented 1 year ago

This issue is because the server includes a native module (actually, a few) which doesn't build on your machine because you don't have the native build environment that it expects available.

This shouldn't normally matter, because all the native modules we use include prebuilds, so that when the install happens, it just automatically downloads a prebuilt version that matches your system from the internet, and you don't need to manually build it.

In this case though, you're using node v18, and the version of node-datachannel we use only has prebuilds up to node v17.

Fairly soon, we're going to update that library and this will go away. In the meantime, you can fix this yourself by either:

bbdwbayu commented 1 year ago

Thank you!