Closed raveendrau closed 4 years ago
And when I tried to install using in on iMac , on macOS Catalina version 10.15.6
HYDDT0011-iMAC:~ raveendra.uppala$ sudo npm install --global speedtest-net
Password:
/usr/local/bin/speedtest-net -> /usr/local/lib/node_modules/speedtest-net/bin/index.js
> lzma-native@4.0.6 install /usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native
> node-pre-gyp install --fallback-to-build && rimraf build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for lzma-native@4.0.6 and node@12.16.2 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/binding-v4.0.6-node-v72-darwin-x64'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/Users/raveendra.uppala/Library/Caches/node-gyp/12.16.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/.node-gyp'
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/binding-v4.0.6-node-v72-darwin-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/binding-v4.0.6-node-v72-darwin-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/binding-v4.0.6-node-v72-darwin-x64/lzma_native.node --module_name=lzma_native --module_path=/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/binding-v4.0.6-node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/speedtest-net/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 19.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/speedtest-net/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native
node-pre-gyp ERR! node -v v12.16.2
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/binding-v4.0.6-node-v72-darwin-x64/lzma_native.node --module_name=lzma_native --module_path=/usr/local/lib/node_modules/speedtest-net/node_modules/lzma-native/binding-v4.0.6-node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lzma-native@4.0.6 install: `node-pre-gyp install --fallback-to-build && rimraf build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lzma-native@4.0.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/raveendra.uppala/.npm/_logs/2020-09-04T07_57_03_894Z-debug.log
HYDDT0011-iMAC:~ raveendra.uppala$
This doesn't work with WebPack. It runs only on node.js and not in the browser.
Hi Team,
I am using this dependency in Angular 2+ project by also installing
npm install @types/speedtest-net --save-dev
and I am importing
import * as speedTest from 'speedtest-net'
and when I called
speedTest()
it's broken and console writes like this:
Any ideas how can I get rid of this issues?