ddsol / speedtest.net

node.js SpeedTest.net client module
MIT License
607 stars 126 forks source link

Windows Support ? #127

Closed HideakiAtsuyo closed 2 years ago

HideakiAtsuyo commented 2 years ago

PS C:\Users\Administrator\Desktop\Discord\Insomnia Bot> npm i --save speedtest-net
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'hawk@0.10.2',
npm WARN EBADENGINE   required: { node: '0.8.x' },
npm WARN EBADENGINE   current: { node: 'v17.1.0', npm: '8.1.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'hoek@0.7.6',
npm WARN EBADENGINE   required: { node: '0.8.x' },
npm WARN EBADENGINE   current: { node: 'v17.1.0', npm: '8.1.2' }
npm WARN EBADENGINE }
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build && rimraf 
build
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR!   build
npm ERR!   Microsoft (R) Library Manager Version 14.29.30137.0
npm ERR!   Copyright (C) Microsoft Corporation.  All rights reserved.
npm ERR!
npm ERR!      Creating library C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\deps\bin_x86-64\lzma.lib and object C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\deps\bin_x86-64\lzma.exp
npm ERR!   deploy
npm ERR!   The syntax of the command is incorrect.
npm ERR! C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for '..\deps\doc\liblzma.def;..\deps\bin_x86-64\liblzma.dll' exited with code 1. [C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\build\liblzma.vcxproj]
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 build --fallback-to-build --module=C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64\lzma_native.node --module_name=lzma_native --module_path=C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0
npm ERR! node-pre-gyp info using node@17.1.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64\lzma_native.node" (not found)
npm ERR! node-pre-gyp http GET https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v4.0.6-node-v102-win32-x64.tar.gz
npm ERR! node-pre-gyp http 404 https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v4.0.6-node-v102-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v4.0.6-node-v102-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for lzma-native@4.0.6 and node@17.1.0 (node-v102 
ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v4.0.6-node-v102-win32-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.3.0
npm ERR! gyp info using node@17.1.0 | 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@8.3.0
npm ERR! gyp info using node@17.1.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.0 found at "C:\Program Files\Python39\python.exe" 
npm ERR! gyp info find VS using VS2019 (16.11.31829.152) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Program Files\Python39\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\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   'msvs',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\Administrator\\Desktop\\Discord\\Insomnia Bot\\node_modules\\lzma-native\\build\\config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\Administrator\\AppData\\Local\\node-gyp\\Cache\\17.1.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=C:\\Users\\Administrator\\AppData\\Local\\node-gyp\\Cache\\17.1.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\17.1.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Administrator\\Desktop\\Discord\\Insomnia Bot\\node_modules\\lzma-native',
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   'C:\\Users\\Administrator\\Desktop\\Discord\\Insomnia Bot\\node_modules\\lzma-native\\build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.3.0
npm ERR! gyp info using node@17.1.0 | win32 | x64
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'build/binding.sln',
npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args   '/nologo',
npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)  
npm ERR! gyp ERR! System Windows_NT 10.0.19042
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" "build" "--fallback-to-build" "--module=C:\\Users\\Administrator\\Desktop\\Discord\\Insomnia Bot\\node_modules\\lzma-native\\binding-v4.0.6-node-v102-win32-x64\\lzma_native.node" "--module_name=lzma_native" "--module_path=C:\\Users\\Administrator\\Desktop\\Discord\\Insomnia Bot\\node_modules\\lzma-native\\binding-v4.0.6-node-v102-win32-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"
npm ERR! gyp ERR! cwd C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native       
npm ERR! gyp ERR! node -v v17.1.0
npm ERR! gyp ERR! node-gyp -v v8.3.0
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 build --fallback-to-build --module=C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64\lzma_native.node --module_name=lzma_native --module_path=C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64 --napi_version=8 --node_abi_napi=napi 
--napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1062:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\Desktop\\Discord\\Insomnia Bot\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"npm ERR! node-pre-gyp ERR! cwd C:\Users\Administrator\Desktop\Discord\Insomnia Bot\node_modules\lzma-native
npm ERR! node-pre-gyp ERR! node -v v17.1.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-11-30T16_50_58_994Z-debug.log
PS C:\Users\Administrator\Desktop\Discord\Insomnia Bot> 
markosole commented 1 year ago

Just move your project to folder where there's no spaces in path or rename folder where you project sit.

Old

C:\Users\Administrator\Desktop\Discord\Insomnia Bot\

New (fixed)

C:\Users\Administrator\Desktop\Discord\Insomnia_Bot\

You can see underscore before _Bot. Looks like that microsoft build tool does not like spaces in paths.

Cheers