18F / analytics-reporter

Lightweight analytics reporting and publishing tool for Digital Analytics Program's Google Analytics 360 data.

Home Page:https://analytics.usa.gov/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running second-level-domains report

konklone opened this issue · comments

I'm seeing this error in the logs:

[second-level-domains] Fetching...

TypeError: Object  has no method 'contains'
    at Object.Analytics.process (/home/analytics/analytics-reporter/analytics.js:221:41)
    at /home/analytics/analytics-reporter/analytics.js:105:42
    at JWT.OAuth2Client._postRequest (/home/analytics/analytics-reporter/node_modules/googleapis/node_modules/google-auth-library/lib/auth/oauth2client.js:381:3)
    at postRequestCb (/home/analytics/analytics-reporter/node_modules/googleapis/node_modules/google-auth-library/lib/auth/oauth2client.js:343:10)
    at Request._callback (/home/analytics/analytics-reporter/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:103:7)
    at Request.self.callback (/home/analytics/analytics-reporter/node_modules/googleapis/node_modules/google-auth-library/node_modules/request/request.js:198:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/home/analytics/analytics-reporter/node_modules/googleapis/node_modules/google-auth-library/node_modules/request/request.js:1057:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/home/analytics/analytics-reporter/node_modules/googleapis/node_modules/google-auth-library/node_modules/request/request.js:1003:12)

The issue is that in version 4.0.0, lodash renamed contains to includes:
https://github.com/lodash/lodash/wiki/Changelog#v400

We should have been using semver to pin to a single major version. I'll have us pin to 3.X as an interim, so that I don't have to go and audit the rest of the code for regressions.