Skip to content

Cannot run npm run cover locally #309

Description

@ryanseys

Well, both npm run test and npm run regression-test both run fine and pass but I cannot generate coverage report using npm run cover (which I thought just ran test and regression-test)?

Error I see:

  1) BigQuery "before all" hook:
     Uncaught TypeError: Cannot call method 'on' of undefined
      at Request.start (/Users/ryanseys/gcloud-node/node_modules/google-service-account/node_modules/gtoken/node_modules/request/request.js:930:12)
      at Request.write (/Users/ryanseys/gcloud-node/node_modules/google-service-account/node_modules/gtoken/node_modules/request/request.js:1689:10)
      at end (/Users/ryanseys/gcloud-node/node_modules/google-service-account/node_modules/gtoken/node_modules/request/request.js:687:14)
      at Object._onImmediate (/Users/ryanseys/gcloud-node/node_modules/google-service-account/node_modules/gtoken/node_modules/request/request.js:710:7)
      at processImmediate [as _immediateCallback] (timers.js:345:15)

Activity

  1. ryanseys commented on Nov 24, 2014

    @ryanseys
    ContributorAuthor

    @stephenplusplus This looks like it's originating from google-service-account but also seems to dive into gtoken so I'm not sure whether it's you or me or something else that's causing this issue but I'm kind of at a loss as to what could cause this. Essentially in the request library @ request.js:930 there's a call for self.req.on(... and self.req is undefined for some reason. Either the request has been discarded or removed or never initiated? Any idea what could have caused this? It's especially weird because npm test and npm run regression-test both work fine. 😕

  2. stephenplusplus commented on Nov 24, 2014

    @stephenplusplus
    Contributor

    Will take a look now 🔍 👓 🐛 🔨

  3. stephenplusplus commented on Nov 24, 2014

    @stephenplusplus
    Contributor

    I seem to be getting a different stacktrace:

      1) BigQuery "before all" hook:
         Uncaught TypeError: Cannot call method 'on' of undefined
          at Request.start (/Users/stephen/dev/gcloud-node/node_modules/request/request.js:930:12)
          at Request.write (/Users/stephen/dev/gcloud-node/node_modules/request/request.js:1689:10)
          at end (/Users/stephen/dev/gcloud-node/node_modules/request/request.js:687:14)
          at Object._onImmediate (/Users/stephen/dev/gcloud-node/node_modules/request/request.js:710:7)
          at processImmediate [as _immediateCallback] (timers.js:345:15)
    

    Could I be doing something wrong?

  4. stephenplusplus commented on Nov 24, 2014

    @stephenplusplus
    Contributor

    Nm, updated request and get the same thing now.

  5. added 2 commits that reference this issue on Nov 24, 2014
    35be3ac
    c591d0b
  6. added a commit that references this issue on Nov 24, 2014
    ea22184
  7. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Feb 2, 2015
  8. added this to the Core Stable milestone on Feb 2, 2015
  9. added a commit that references this issue on Aug 22, 2022
  10. 31 remaining items

  11. added a commit that references this issue on Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🚨This issue needs some love.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions