Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flags.trim() error #162

Closed
jooj123 opened this issue Mar 22, 2018 · 3 comments
Closed

flags.trim() error #162

jooj123 opened this issue Mar 22, 2018 · 3 comments

Comments

@jooj123
Copy link
Contributor

jooj123 commented Mar 22, 2018

Config / CLI options

module.exports = {
  url: 'http://localhost:3000/blahblah',
  flags: {
    runs: '1', 
    submit: false, 
    upload: false, 
    view: false, 
    expectations: true,
    chromeFlags: [
      '--headless',
    ],
  },
  expectations: {
    ttfcp: {
      warn: '>=7189',
      error: '>=9000',
    },
    ttfmp: {
      warn: '>=8387',
      error: '>=10000',
    },
    psi: {
      warn: '>=30842',
      error: '>=35000',
    },
    fv: {
      warn: '>=7190',
      error: '>=8000',
    },
    vc: {
      warn: '>=30912',
      error: '>=35000',
    },
    vc85: {
      warn: '>=28759',
      error: '>=30000',
    },
  },
};

Steps to reproduce.

Run:
pwmetrics --config=test/performance/pwmetrics-config.js
as npm command

Stack trace

/Users/martin.jujou/Documents/projects/fe-server-search-results/node_modules/lighthouse/lighthouse-cli/run.js:33
      flags.trim(), {configuration: {'camel-case-expansion': false, 'boolean-negation': false}});
            ^

TypeError: flags.trim is not a function
    at parseChromeFlags (/Users/martin.jujou/Documents/projects/fe-server-search-results/node_modules/lighthouse/lighthouse-cli/run.js:33:13)
    at new PWMetrics (/Users/martin.jujou/Documents/projects/fe-server-search-results/node_modules/pwmetrics/lib/index.js:57:34)
    at Object.<anonymous> (/Users/martin.jujou/Documents/projects/fe-server-search-results/node_modules/pwmetrics/bin/cli.js:99:19)
    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)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Screenshot

NA

Environment

  1. pwmetrics version: 3.1.6
  2. Chrome version: 64
  3. OS version: Mac El Capitan

Note: if i go back to version 3.1.2 everything works.

@denar90
Copy link
Collaborator

denar90 commented Mar 23, 2018

I tried with http://example.com url and it works fine. @jooj123 can you plz try another url? maybe problem that page can't be reached, I dunno right now...

@jooj123
Copy link
Contributor Author

jooj123 commented Mar 29, 2018

Not sure why but I can no longer reproduce .. Closing for now

@jooj123 jooj123 closed this as completed Mar 29, 2018
@mbejda
Copy link

mbejda commented Jan 13, 2019

It may be related to this Lighthouse issue.
Runtime error encountered: flags.trim is not a function after update to 2.8.0 to 2.9.1
GoogleChrome/lighthouse#4596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants