Git Product home page Git Product logo

fast-cli's Introduction

fast-cli

Test your download and upload speed using fast.com

Install

Ensure you have Node.js version 12.20+ installed. Then run the following:

npm install --global fast-cli

This project uses Puppeteer under the hood. Most install issues are related to that.

Usage

$ fast --help

  Usage
    $ fast
    $ fast > file

  Options
    --upload, -u   Measure upload speed in addition to download speed
    --single-line  Reduce spacing and output to a single line
    --json         JSON output

  Examples
    $ fast --upload > file && cat file
    17 Mbps
    4.4 Mbps

    $ fast --upload --json
Upload speed

JSON output

The speeds are in Mbps.

fast --upload --json
{
	"downloadSpeed": 52,
	"uploadSpeed": 64,
	"downloaded": 270,
	"uploaded": 290,
	"latency": 9,
	"bufferBloat": 46,
	"userLocation": "Somewhere, NO",
	"userIp": "49.222.206.21"
}

Related

  • speed-test - Test your internet connection speed and ping using speedtest.net

fast-cli's People

Contributors

akx avatar brandon93s avatar bsouthga avatar codedotjs avatar corbinhesse avatar gilday avatar iamnapo avatar jopemachine avatar kevinji avatar owst avatar s0verina avatar sindresorhus avatar sonicdoe avatar stevemao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fast-cli's Issues

Error installing

My node/nodejs version: v8.9.1
NPM: 5.5.1

Ubuntu: I tried in a Xenial Xerus and a Bionic Beaver

/usr/bin/fast -> /usr/lib/node_modules/fast-cli/cli.js

> [email protected] install /usr/lib/node_modules/fast-cli/node_modules/puppeteer
> node install.js

fs.js:885
  return binding.mkdir(pathModule._makeLong(path),
                 ^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium'
    at Object.fs.mkdirSync (fs.js:885:18)
    at Object.downloadRevision (/usr/lib/node_modules/fast-cli/node_modules/puppeteer/utils/ChromiumDownloader.js:99:10)
    at Object.<anonymous> (/usr/lib/node_modules/fast-cli/node_modules/puppeteer/install.js:45:12)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /home/forge/.npm/_logs/2017-12-01T14_40_11_061Z-debug.log

Ignore HTTPS errors when over proxy (or security services)

When the machine running fast-cli is behind an http/https proxy, fast-cli returns the error

› net::ERR_CERT_AUTHORITY_INVALID at https://fast.com

If I change line 54 of api.js to include --ignore-certificate-errors then fast-cli returns the error

› Evaluation failed: TypeError: Cannot read properties of null (reading
  'textContent')
      at __puppeteer_evaluation_script__:5:44

Would be great to add a flag to ignore https errors so that fast-cli can be used also with proxies or security services that inspect http/https traffic. Thanks!

error while compiling from source

node -v
v12.18.3

i cloned this repo and did npm install to install all the dependencies but it is failing to run due to some error, i am new to javascript and its framework.

npm run test

[email protected] test C:\Users\Itachi-PC\Javascript_tutorial\fast-cli
xo && ava

1 test failed

default

C:\Users\Itachi-PC\Javascript_tutorial\fast-cli\test.js:6

5: test.cb('default', t => {
6: const cp = childProcess.spawn('./cli.js', {stdio: 'inherit'});
7:

Error thrown in test:

Error {
code: 'UNKNOWN',
errno: 'UNKNOWN',
syscall: 'spawn',
message: 'spawn UNKNOWN',
}

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: xo && ava
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test 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:

Can't run fast-cli

Problem

I Installed fast-cli with yarn. And when I ran fast --upload, It caused an error.

Screen Shot 2021-12-18 at 2 21 42 AM

  ERROR  Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
        1. You might have mismatching versions of React and the renderer (such as React DOM)
        2. You might be breaking the Rules of Hooks
        3. You might have more than one copy of React in the same app
        See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.

 - 1. You might have mismatching versions of React and the renderer (such as React DOM)
 - 2. You might be breaking the Rules of Hooks
 - 3. You might have more than one copy of React in the same app
 - See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
 - resolveDispatcher (/Users/wdever/.config/yarn/global/node_modules/react/cjs/react.development.js:1465:13)
 - useState (/Users/wdever/.config/yarn/global/node_modules/react/cjs/react.development.js:1496:20)
 - Fast (/Users/wdever/.config/yarn/global/node_modules/fast-cli/ui.js:104:29)
 - renderWithHooks (/Users/wdever/.config/yarn/global/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:6036:18)
 - mountIndeterminateComponent (/Users/wdever/.config/yarn/global/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:8570:13)
 - beginWork$1 (/Users/wdever/.config/yarn/global/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:9938:16)
 -Object.invokeGuardedCallbackImpl (/Users/wdever/.config/yarn/global/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:11563:
                                  10)
 - invokeGuardedCallback (/Users/wdever/.config/yarn/global/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:11740:31)
 - beginWork$$1 (/Users/wdever/.config/yarn/global/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:15778:7)
 - performUnitOfWork (/Users/wdever/.config/yarn/global/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:14696:12)

Reproduce

  1. instsall fast-cli with yarn global add fast-cli
  2. run fast --upload

Environment

  • node.js : v16.13.1
  • os : macOS 12.0.1 (But I met this bug when I'm using catalina)
  • package manager : yarn

Why not transpile?

So, it'll work for all node versions
It's a one-shot single line of babel

SyntaxError: Use of const in strict mode.

$ sudo npm install -g fast-cli

[email protected]
[email protected]

$ fast or $ fast --help produce

/usr/lib/node_modules/fast-cli/cli.js:3
const meow = require('meow');
^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Can't Install on Ubuntu 18.xx - NodeJS 8.xx

Hello,

I am getting this message while trying to install -

root@tajize-pc:~# npm install --global fast-cli
/usr/bin/fast -> /usr/lib/node_modules/fast-cli/cli.js

> [email protected] install /usr/lib/node_modules/fast-cli/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r579032! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium'
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2018-08-16T21_02_39_996Z-debug.log

I have attached the log file too ... Please check and help me to solve the issue.

Thanks in advance.

2018-08-16T21_02_39_996Z-debug.log

I get syntax error when running.

/usr/lib/node_modules/fast-cli/cli.js:52
(async () => {
       ^
SyntaxError: Unexpected token (
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:513:28)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (bootstrap_node.js:352:7)
    at startup (bootstrap_node.js:144:9)
    at bootstrap_node.js:467:3

Is it something with the code?

Broken on Centos 7

node --version
v10.6.0

npm install --global fast-cli
/usr/bin/fast -> /usr/lib/node_modules/fast-cli/cli.js

[email protected] install /usr/lib/node_modules/fast-cli/node_modules/puppeteer
node install.js

ERROR: Failed to download Chromium r564778! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium']
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path:
'/usr/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /root/.npm/_logs/2018-07-10T23_18_13_776Z-debug.log
[root@family ~]#

Raspbian system won't launch Chromium

I am getting this error for the command fast:

Failed to launch chrome!
/home/user/.nvm/versions/node/v10.16.1/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium/linux-674921/chrome-linux/chrome: 1: /home/user/.nvm/versions/node/v10.16.1/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium/linux-674921/chrome-linux/chrome: Syntax error: Unterminated quoted string


TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

I went through the steps on the troubleshooting link and found that all dependencies are installed except for one. (libappindicator1). However after installing the package, the issue still persists.

[Solved] Chromium required on headless server

I understand by default puppeteer requires chromium. After installing the dependencies according to the puppeteer troubleshooting guide, fast would work, but it would merely time out. After running it in debug mode, i.e.

DEBUG=* fast --upload --single-line

I ran into an Inspector.targetCrashed error. After doing some googling, I determined I needed to install the chromium package, in order to pull in ALL of its dependencies (not just the direct ones seen with ldd). Once I did that, fast worked as expected.

It's sad to have to install a GUI program on a headless server. I saw where @sindresorhus had previously based fast-cli on PhantomJS, but it must have had some deficiencies I'm unaware of. A lot of the puppeteer troubleshooting suggests turning off headless mode, but that won't work for a headless server (locally, or in the cloud). I couldn't reproduce this initially on my laptop, but that's because it had chromium installed already.

I was able to fix this on two headless servers. My experience was on Arch Linux, but it should be the same for any other distribution. I wanted fast-cli to work since my ISP's technicians use fast.com for their speed testing (they openly told me not to use my ISP's speedtest server). I've tried speedtest-cli and iperf3 (against a public server) with unsatisfactory results. Once I got fast working on my first try my speed was quite good (870 Mbps ↓ / 390 Mbps ↑)! I intend to run periodic fast speedtests, and log it so I can see my average/maximum/minumum over time.

I post this for anyone else trying to use fast-cli on a headless server, and can't figure out why it doesn't work. I spent a good three hours trying to figure this out, by disabling the timeout, setting the user agent, and trying some other chromium flags.

EDIT: Make sure you run fast on a system with plenty of memory! I was running it on my router (only has 4GiB RAM) and that was limiting how fast fast could be. Running it on a server on my network (with 16GiB RAM) fares MUCH better.

Figure out how to get it to work with jsdom

Would be much more lightweight using jsdom than the current PhantomJS setup.

This is how far I got. Currently only returns 0, which means the JS on the site is never run for some reason.

'use strict';
const jsdom = require('jsdom');

jsdom.env({
    url: 'http://fast.com/',
    scripts: ['http://code.jquery.com/jquery.js'],
    userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36',
    strictSSL: false,
    features: {
        FetchExternalResources: ['script'],
        ProcessExternalResources: ['script']
    },
    done: (err, window) => {
        if (err) {
            throw err;
        }

        setTimeout(() => {
            console.log('Speed:', window.$('#speed-value').text().trim(), window.$('#speed-units').text().trim());
        }, 5000);
    }
});

Help appreciated 😀

Using stock chromium

I have puppeteer installed with PUPPETEER_SKIP_CHROMIUM_DOWNLOAD set and I have chromium installed through distribution packages (Arch Linux).
When I try to run fast, I get the following:

$ fast
Chromium revision is not downloaded. Run "npm install" or "yarn install"

Protocol error: Target closed.

I'm on Arch Linux 5.14.16. Installed the tool and ran it with and without sudo:

~  % sudo fast -v                                                                                                           
› Protocol error (Page.navigate): Target closed.

Tried all the options to no avail. I don't see any verbose mode or logs that I can provide you with. Unfortunately time's a little tight for me right now to clone and troubleshoot, so maybe you have any quick suggestions.

Please let me know if there's anything else that I can do to help.

Add Docker

Add a Dockerfile to eliminate the npm install requirement

Fast.com cli not working... 0kbps output

Hello!! How are you?

Well... I’ve checked that its getting an error when trying to execute fast.com cli

I installed fast cli with the following command: snap install fast

When I try to execute fast —upload and then fast —download I always get 0 Kbps.

Please, check my screen:

ADC606CC-3B76-4222-A46E-34524CDE8AB2

Do you have an idea on what could be happening!?

It used to work very nice!

Thank you very much!

Hope to hear from you

Sincerely,
Mat

JSON output

If you get time at one point, it would be great if a feature logging feature like you have in the speed-test repo.
If I knew how to port the functionality, I would have gladly done it, but I am still at the "one day i will have a look at nodejs" phase :)

All the best.

Fast —download and fast —upload working?

Hello everyone!
I am using a virtual machine from google cloud and we know they have an amazing host.

In case, when doing the line commands:
fast —download and fast —upload I am getting this results:

9AD4014B-6107-4929-AAB0-109FF21A3EC3

I’d like to know better if fast.com cli commands are working fine on download/upload tests.
Can we trust this results?!

Thanks! Hope to hear from you
:)

Another very important point is:
I can’t get this high values (down/up > 4.35gbps/4.43gbps) from fast.com website. I just get it when doing by line commands. What could it be? tks!!

Can't run fast-cli on new raspbian fully updated installation.

Here is what I have done:
I installed the:
latest Raspbian with desktop: 2021-01-11-raspios-buster-armhf-full.zip on a headless Raspberry Pi 3B+

I ran:
sudo apt-get update
sudo apt-get dist-upgrade

Rebooted.
Installed:
latest Nodej 15.x using
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs

Installed:
latest fast-cli according to the info on the fast-cli github,

I saw there was an update npm so I ran this to update to the latest:
sudo npm install -g npm@latest

When I try to run:
fast --upload --single-line

I get this error message:

Failed to launch chrome!
/usr/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: 1: /usr/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: Syntax error: Unterminated quoted string

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

I rebooted again and get the same error message.

I've tried installing chrome:
sudo apt-get install chromium
sudo apt-get install chromium-browser

I was able to use that last one to save a PDF file:
chromium-browser --headless --disable-gpu --print-to-pdf https://www.google.com
That results in a pdf file being saved at the location of running it.

Not sure what else is missing. If you know of a dependency that is required to run fast-cli as it depends on puppeteer, can you just come out and say what it is?

Not working on linux/arm64

hi,

i am trying this on an arm64 platform (not x86):

npm install --global fast-cli

|
|

node install.js

PhantomJS not found on PATH
Unexpected platform or architecture: linux/arm64
It seems there is no binary available for your platform/architecture
Try to install PhantomJS globally
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.4.23-linaro-lt-qcom
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--global" "fast-cli"
npm ERR! cwd /root
npm ERR! node -v v4.4.3
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0

I am running on a small embedded development platform, running Debian Jessie.

Required libraries on Debian

required following libraries to run on a headless server:

libglib2.0-0 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo-5c0 libasound2

may want to include in instructions.

Fails to install on Centos 8

[root@toph twilcox]# node --version
v12.16.2
[root@toph twilcox]# npm --version
6.14.4
3656 silly install [email protected]
3657 info lifecycle [email protected]~install: [email protected]
3658 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle false
3659 verbose lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/node_modules/fast-cli/node_modules/puppeteer/node_modules/.bin:/usr/lib/node_modules/fast-cli/node_modules/.bin:/usr/lib/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin
3660 verbose lifecycle [email protected]~install: CWD: /usr/lib/node_modules/fast-cli/node_modules/puppeteer
3661 silly lifecycle [email protected]~install: Args: [ '-c', 'node install.js' ]
3662 silly lifecycle [email protected]~install: Returned: code: 1  signal: null
3663 info lifecycle [email protected]~install: Failed to exec install script
3664 timing action:install Completed in 172ms
3665 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
3666 timing stage:rollbackFailedOptional Completed in 98ms
3667 timing stage:runTopLevelLifecycles Completed in 4663ms
3668 verbose stack Error: [email protected] install: `node install.js`
3668 verbose stack Exit status 1
3668 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
3668 verbose stack     at EventEmitter.emit (events.js:310:20)
3668 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
3668 verbose stack     at ChildProcess.emit (events.js:310:20)
3668 verbose stack     at maybeClose (internal/child_process.js:1021:16)
3668 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
3669 verbose pkgid [email protected]
3670 verbose cwd /home/twilcox
3671 verbose Linux 4.4.217-1.el7.elrepo.x86_64
3672 verbose argv "/usr/bin/node" "/bin/npm" "install" "--global" "fast-cli"
3673 verbose node v12.16.2
3674 verbose npm  v6.14.4
3675 error code ELIFECYCLE
3676 error errno 1
3677 error [email protected] install: `node install.js`
3677 error Exit status 1
3678 error Failed at the [email protected] install script.
3678 error This is probably not a problem with npm. There is likely additional logging output above.
3679 verbose exit [ 1, true ]```

Unexpected token function

I installed fast-cli with "npm install --global fast-cli" and upon running "fast" I received the following error.

/usr/local/lib/node_modules/fast-cli/api.js:6
async function init(browser, page, observer, prevSpeed) {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:513:28)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/fast-cli/cli.js:8:13)
    at Module._compile (module.js:541:32)

Use as nodejs package

Hi,
first I want say this package is amazing.
Can I use it somehow in my NodeJS app using require()? I want to get network speed and then use it.
Thanks

Eerror when installing

Program wont install on Pi4

To reproduce:

  1. sudo npm i npm@latest -g
  2. npm install --global fast-cli
  3. See error
$ sudo npm install --global fast-cli
/usr/local/bin/fast -> /usr/local/lib/node_modules/fast-cli/cli.js

> [email protected] install /usr/local/lib/node_modules/fast-cli/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/local/lib/node_modules/fast-cli/node_modules/puppeteer/lib/helper.js:111:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/fast-cli/node_modules/puppeteer/install.js:64:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path:
   '/usr/local/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2020-12-11T15_36_37_167Z-debug.log

Desktop set up:
Raspberry Pi4
Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 5.4.73-v7l+

Install fails on node v12.15.0 (npm v6.13.7)

Installing fast-cli on the latest stable (LTS) version of node results in a number of compile errors on Mac OS X Catalina (10.15.3).

I use nvm to switch between node versions. The previous LTS version still works as expected, however running the install command with node v12.15.0 results in the following error

$ nvm use
Found '/Users/chris/.nvmrc' with version <lts/*>
Now using node v12.15.0 (npm v6.13.7)

$ npm install -g fast
> [email protected] install /Users/chris/.nvm/versions/node/v12.15.0/lib/node_modules/fast/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

  ACTION binding_gyp_ndtp_target_build_ndtp .
  TOUCH Release/obj.target/ndtp.stamp

> [email protected] install /Users/chris/.nvm/versions/node/v12.15.0/lib/node_modules/fast/node_modules/microtime
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.15.0 runtime=node arch=x64 platform=darwin)
  CXX(target) Release/obj.target/microtime/src/microtime.o
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:192:
../node_modules/nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
         ~~~  ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:197:
In file included from ../node_modules/nan/nan_converters.h:59:
../node_modules/nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../node_modules/nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
      val->To ## TYPE(v8::Isolate::GetCurrent()->GetCurrentContext())          \
           ^
<scratch space>:10:1: note: expanded from here
ToBoolean
^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:2567:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATED("ToBoolean can never throw. Use Local version.",
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:197:
In file included from ../node_modules/nan/nan_converters.h:59:
../node_modules/nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../node_modules/nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
              ^
<scratch space>:17:1: note: expanded from here
BooleanValue
^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:2605:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:198:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
  return scope.Escape(v8::Function::New( isolate
                                         ^~~~~~~
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
      ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:187:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
  V8_INLINE Local(Local<S> that)
            ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:4171:22: note: passing argument to parameter 'context' here
      Local<Context> context, FunctionCallback callback,
                     ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:198:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:5426:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:198:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:337:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../node_modules/nan/nan_implementation_12_inl.h:337:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:834:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:173:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:93:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:849:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:166:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:93:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:864:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:159:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:93:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:911:44: error: no matching member function for call to 'ToString'
      v8::Local<v8::String> string = from->ToString();
                                     ~~~~~~^~~~~~~~
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:921:37: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
                                    ^~~~
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:2782:26: note: passing argument to parameter 'isolate' here
  int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
                         ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return scope.Escape(node::MakeCallback(
                              ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:173:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/node.h:93:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:1533:28: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
                           ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:1539:28: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    New(persistentHandle)->Set(key, value);
                           ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:1545:28: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    New(persistentHandle)->Set(index, value);
                           ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:1551:32: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        New(persistentHandle)->Get(New(key).ToLocalChecked()));
                               ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:1557:48: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    return scope.Escape(New(persistentHandle)->Get(key));
                                               ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
../node_modules/nan/nan.h:1562:48: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    return scope.Escape(New(persistentHandle)->Get(index));
                                               ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3461:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:2222:
../node_modules/nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:2222:
../node_modules/nan/nan_object_wrap.h:67:18: warning: 'MarkIndependent' is deprecated: Weak objects are always considered independent. Use TracedGlobal when trying to use EmbedderHeapTracer. Use a strong handle when trying to keep an object alive. [-Wdeprecated-declarations]
    persistent().MarkIndependent();
                 ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:563:3: note: 'MarkIndependent' has been explicitly marked deprecated here
  V8_DEPRECATED(
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/microtime.cc:9:
In file included from ../node_modules/nan/nan.h:2222:
../node_modules/nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
../src/microtime.cc:75:10: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  array->Set(Nan::New<v8::Integer>(0), Nan::New<v8::Number>((double)t.tv_sec));
         ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/microtime.cc:76:10: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  array->Set(Nan::New<v8::Integer>(1), Nan::New<v8::Number>((double)t.tv_usec));
         ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/chris/Library/Caches/node-gyp/12.15.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
15 warnings and 9 errors generated.
make: *** [Release/obj.target/microtime/src/microtime.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/chris/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/chris/.nvm/versions/node/v12.15.0/bin/node" "/Users/chris/.nvm/versions/node/v12.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/chris/.nvm/versions/node/v12.15.0/lib/node_modules/fast/node_modules/microtime
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/chris/.npm/_logs/2020-02-06T15_21_38_821Z-debug.log

amazeballs

you are seriously a very generous person. Thanks.

but...

module.js:327
    throw err;
    ^

Error: Cannot find module './api'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/fast-cli/cli.js:8:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

node 4.4.4
npm 3.8.9

Error: Cannot find module './ui'

Hi there! I have seen an issue while using it. Do you know how to solve that?

~ npm install --global fast-cli
/Users/erkan.zileli/.nvm/versions/node/v12.18.3/bin/fast -> /Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/cli.js
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=12.20"} (current: {"node":"12.18.3","npm":"6.14.6"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]

+ [email protected]
updated 1 package in 11.29s
~ fast
/Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Cannot find module './ui'
Require stack:
- /Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/noop.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at resolveFileName (/Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/node_modules/resolve-from/index.js:17:39)
    at resolveFrom (/Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/node_modules/resolve-from/index.js:31:9)
    at module.exports (/Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/node_modules/resolve-from/index.js:34:41)
    at importJsx (/Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/node_modules/import-jsx/index.js:20:21)
    at Object.<anonymous> (/Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/cli.js:10:12)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/erkan.zileli/.nvm/versions/node/v12.18.3/lib/node_modules/fast-cli/noop.js'
  ]
}

"The term 'fast' is not recognized as the name of a cmdlet, function, script file, or operable program."

I am on Windows 10 and I installed from npm. The output of > npm ls shows it is installed

@ C:\Users<name>
`-- [email protected]'

but when I run > fast it outputs

fast : The term 'fast' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ fast
+ ~~~~
+ CategoryInfo : ObjectNotFound: (fast:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Add mininmum node version requirement

too lazy for a pull request but you probably want something like

{ "engines" : { "node" : ">=5.0" } }

in package.json to avoid

➜  ~ fast

/usr/local/lib/node_modules/fast-cli/cli.js:3
const meow = require('meow');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

ERROR Cannot read properties of undefined (reading 'dots')

Hi,

This error I get when running the following
$ docker run -it --rm node:16.10 bash
and there:
root@8b8667a72d56:/# npm install --global fast-cli

Error then when running fast is the following:

root@8b8667a72d56:/# fast

  ERROR  Cannot read properties of undefined (reading 'dots')

 /usr/local/lib/node_modules/fast-cli/node_modules/ink-spinner/build/index.js:12:43

  9:  */
 10: const Spinner = ({ type = 'dots' }) => {
 11:     const [frame, setFrame] = react_1.useState(0);
 12:     const spinner = cli_spinners_1.default[type];
 13:     react_1.useEffect(() => {
 14:         const timer = setInterval(() => {
 15:             setFrame(previousFrame => {

 - Spinner (/usr/local/lib/node_modules/fast-cli/node_modules/ink-spinner/build/index.js:12:43)
 - renderWithHooks (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:6036:18)
 - mountIndeterminateComponent (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:8570:13)
 - beginWork$1 (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:9938:16)
 - Object.invokeGuardedCallbackImpl (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:11563:10)
 - invokeGuardedCallback (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:11740:31)
 - beginWork$$1 (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:15778:7)
 - performUnitOfWork (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:14696:12)
 - workLoopSync (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:14669:22)
 - performSyncWorkOnRoot (/usr/local/lib/node_modules/fast-cli/node_modules/react-reconciler/cjs/react-reconciler.development.js:14265:11)

``

Failed to launch chromium error when running command

I did everything the README.md file required me to install, after running it displayed this:

root@------:~# fast
Failed to launch chrome!
/usr/local/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

root@------:~#

Keep in mind i tried to do this on multiple servers. Any ideas?

Add ability to run tests using custom settings

Fast.com has settings which can be configured and saved on a per-browser basis. Here's a screenshot of the settings:
image

Is it possible to add a feature which would enable users to specify the values of these settings from the command line?

Low bandwidth

What kind of speeds are expected with this tool?

I find it a lot slower when comparing to the browser one.
fast-cli : ~50 to 150 mbit/s
chromium: ~1.5 gbit/s

Fedora 29 / node v11.10.0 / fast 2.3.0

Improve the API

Currently it's just a callback that gets called for every changed value. Would be nicer to use a promise with an event emitter on it. The promise should resolve when done and have the same result object as the progress.

const api = require('./api');

api().on('progress', result => {
    console.log('progress');
}).then(result => {
    console.log('done');
});

Pull request appreciated :)

Provide distribution packages

It would be great to have distribution packages for e.g.

  • Arch Linux (AUR)
  • Debian / Ubuntu (deb / PPA)
  • Fedora / Red Hat (rpm)

That would tremendously simplify the use.

show more details in results

It would be handy if the results showed more details (similar to the fast.com website) such as the latency stats and the server location.

Cron and --single-line

Since this option does not work for me, because it still prints several lines on my output, this is what I did for Cron to work fine running this Bash script:

#!/bin/sh
speedtest=$(/usr/local/bin/node /usr/local/lib/node_modules/fast-cli/cli.js --single-line -u | tail -n 1 | awk '{ print substr( $0, 17 ) }')
result=$(date +'%d/%m/%Y %T ')$(echo $speedtest)
echo $result >> speedtest.txt

Completely different results between fast-cli and fast.com

Hi everyone,

I just tested fast-cli and wondering about the completely different results it produces at the same machine compared to fast.com website. I first ran fast-cli and right after that visited fast.com, these are the results

grafik

grafik

As you can see, fast-cli download results are 9 times slower, than fast.com, upload results are almost the same...

Any idea?

CLI tool needs X11?

Does this tool need X installed?

root@MYBOX:~# fast


   ⠙ 


Failed to launch chrome!
/usr/local/lib/node_modules/fast-cli/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory


TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

Solve Error When Installing `fast` On Windows 10 Via PowerShell

Hi,
I wanted to share with you a solution for an error I received when installing fast on Windows 10 via PowerShell.
It may be beneficial to add this to a "troubleshooting" documentation of some sort.

Steps I Made For Installation

I installed fast on Windows 10 via PowerShell, with:

npm install --global fast-cli

The installation had finished successfully, and I wanted to run fast with:

fast

And I received the following error:

fast.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at

image

Solution

So I searched for it on StackOverflow here, and it seems that it got fixed by running the command:

set-ExecutionPolicy RemoteSigned -Scope CurrentUser

And then fast worked fine from any PowerShell window (not only the window that I just ran that command on).

So in total the whole process looks like this:

image

Doesn't work.

``

`fast -u
/home/dodalovic/.nvm/versions/node/v17.3.0/lib/node_modules/fast-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/home/dodalovic/.nvm/versions/node/v17.3.0/lib/node_modules/fast-cli/node_modules/import-jsx/cache.js:23:22)
at handleCache (/home/dodalovic/.nvm/versions/node/v17.3.0/lib/node_modules/fast-cli/node_modules/import-jsx/cache.js:43:36)
at module.exports (/home/dodalovic/.nvm/versions/node/v17.3.0/lib/node_modules/fast-cli/node_modules/import-jsx/cache.js:97:9)
at Module.module._compile (/home/dodalovic/.nvm/versions/node/v17.3.0/lib/node_modules/fast-cli/node_modules/import-jsx/index.js:37:19)
at Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Object.require.extensions. (/home/dodalovic/.nvm/versions/node/v17.3.0/lib/node_modules/fast-cli/node_modules/import-jsx/index.js:49:3)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v17.3.0

Sytax Error when running

$ fast
/usr/local/lib/node_modules/fast-cli/api.js:6
async function init(browser, page, observer, prevSpeed) {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/fast-cli/cli.js:8:13)

[email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.