speedtest.net icon indicating copy to clipboard operation
speedtest.net copied to clipboard

Unable to install the module

Open sireeshdevaraj opened this issue 3 years ago • 3 comments

below is my error log when i try to install using npm i speedtest-net

988 error code 1
989 error path D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native
990 error command failed
991 error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build && rimraf build
992 error Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
992 error   build
992 error   Microsoft (R) Library Manager Version 14.29.30142.1
992 error   Copyright (C) Microsoft Corporation.  All rights reserved.
992 error
992 error      Creating library D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native\deps\bin_x86-64\lzma.lib and object D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native\deps\bin_x86-64\lzma.exp
992 error   deploy
992 error   The syntax of the command is incorrect.
992 error C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\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. [D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native\build\liblzma.vcxproj]
992 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=D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64\lzma_native.node --module_name=lzma_native --module_path=D:\desktop\mini desktop\projects\testspeed\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)
993 error node-pre-gyp info it worked if it ends with ok
993 error node-pre-gyp info using [email protected]
993 error node-pre-gyp info using [email protected] | win32 | x64
993 error node-pre-gyp WARN Using needle for node-pre-gyp https download
993 error node-pre-gyp info check checked for "D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64\lzma_native.node" (not found)
993 error node-pre-gyp http GET https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v4.0.6-node-v102-win32-x64.tar.gz
993 error node-pre-gyp http 404 https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v4.0.6-node-v102-win32-x64.tar.gz
993 error 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
993 error node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v102 ABI, unknown) (falling back to source compile with node-gyp)
993 error 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
993 error gyp info it worked if it ends with ok
993 error gyp info using [email protected]
993 error gyp info using [email protected] | win32 | x64
993 error gyp info ok
993 error gyp info it worked if it ends with ok
993 error gyp info using [email protected]
993 error gyp info using [email protected] | win32 | x64
993 error gyp info find Python using Python version 3.10.4 found at "C:\Users\kuuhaku\AppData\Local\Programs\Python\Python310\python.exe"
993 error gyp info find VS using VS2019 (16.11.32407.337) found at:
993 error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
993 error gyp info find VS run with --verbose for detailed information
993 error gyp info spawn C:\Users\kuuhaku\AppData\Local\Programs\Python\Python310\python.exe
993 error gyp info spawn args [
993 error gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
993 error gyp info spawn args   'binding.gyp',
993 error gyp info spawn args   '-f',
993 error gyp info spawn args   'msvs',
993 error gyp info spawn args   '-I',
993 error gyp info spawn args   'D:\\desktop\\mini desktop\\projects\\testspeed\\node_modules\\lzma-native\\build\\config.gypi',
993 error gyp info spawn args   '-I',
993 error gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
993 error gyp info spawn args   '-I',
993 error gyp info spawn args   'C:\\Users\\kuuhaku\\AppData\\Local\\node-gyp\\Cache\\17.1.0\\include\\node\\common.gypi',
993 error gyp info spawn args   '-Dlibrary=shared_library',
993 error gyp info spawn args   '-Dvisibility=default',
993 error gyp info spawn args   '-Dnode_root_dir=C:\\Users\\kuuhaku\\AppData\\Local\\node-gyp\\Cache\\17.1.0',
993 error gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
993 error gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\kuuhaku\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\17.1.0\\\\<(target_arch)\\\\node.lib',
993 error gyp info spawn args   '-Dmodule_root_dir=D:\\desktop\\mini desktop\\projects\\testspeed\\node_modules\\lzma-native',
993 error gyp info spawn args   '-Dnode_engine=v8',
993 error gyp info spawn args   '--depth=.',
993 error gyp info spawn args   '--no-parallel',
993 error gyp info spawn args   '--generator-output',
993 error gyp info spawn args   'D:\\desktop\\mini desktop\\projects\\testspeed\\node_modules\\lzma-native\\build',
993 error gyp info spawn args   '-Goutput_dir=.'
993 error gyp info spawn args ]
993 error gyp info ok
993 error gyp info it worked if it ends with ok
993 error gyp info using [email protected]
993 error gyp info using [email protected] | win32 | x64
993 error gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
993 error gyp info spawn args [
993 error gyp info spawn args   'build/binding.sln',
993 error gyp info spawn args   '/clp:Verbosity=minimal',
993 error gyp info spawn args   '/nologo',
993 error gyp info spawn args   '/p:Configuration=Release;Platform=x64'
993 error gyp info spawn args ]
993 error gyp ERR! build error
993 error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
993 error gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
993 error gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
993 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
993 error gyp ERR! System Windows_NT 10.0.19044
993 error 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=D:\\desktop\\mini desktop\\projects\\testspeed\\node_modules\\lzma-native\\binding-v4.0.6-node-v102-win32-x64\\lzma_native.node" "--module_name=lzma_native" "--module_path=D:\\desktop\\mini desktop\\projects\\testspeed\\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"
993 error gyp ERR! cwd D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native
993 error gyp ERR! node -v v17.1.0
993 error gyp ERR! node-gyp -v v8.3.0
993 error gyp ERR! not ok
993 error node-pre-gyp ERR! build error
993 error 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=D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native\binding-v4.0.6-node-v102-win32-x64\lzma_native.node --module_name=lzma_native --module_path=D:\desktop\mini desktop\projects\testspeed\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)
993 error node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\desktop\mini desktop\projects\testspeed\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
993 error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
993 error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1062:16)
993 error node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
993 error node-pre-gyp ERR! System Windows_NT 10.0.19044
993 error node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\desktop\\mini desktop\\projects\\testspeed\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
993 error node-pre-gyp ERR! cwd D:\desktop\mini desktop\projects\testspeed\node_modules\lzma-native
993 error node-pre-gyp ERR! node -v v17.1.0
993 error node-pre-gyp ERR! node-pre-gyp -v v0.11.0
993 error node-pre-gyp ERR! not ok
994 verbose exit 1

sireeshdevaraj avatar May 26 '22 14:05 sireeshdevaraj

I have the same problem!

Canmatteo avatar Jul 07 '22 18:07 Canmatteo

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

Example of bac path

C:\Users\Administrator\Desktop\Project\My Bot\

New (fixed)

C:\Users\Administrator\Desktop\Project\My_Bot\

You can see underscore before _Bot. Looks like that microsoft build tool does not like spaces in paths. It's old issue but problem still exists on Windows platform.

Cheers!

markosole avatar May 12 '23 21:05 markosole

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

Example of bac path

C:\Users\Administrator\Desktop\Project\My Bot\

New (fixed)

C:\Users\Administrator\Desktop\Project\My_Bot\

You can see underscore before _Bot. Looks like that microsoft build tool does not like spaces in paths. It's old issue but problem still exists on Windows platform.

Cheers!

This doesn't work for me. Any other ideas?

alivarastepour avatar Dec 20 '23 11:12 alivarastepour