-
Notifications
You must be signed in to change notification settings - Fork 24
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
Upgrade to Latest Lighthouse 5.2 #24
Comments
Hi @nateclarks, did you find any solution to this problem? |
Same problem here :( |
@nateclarks @MarcoFaul the problem is the function You'll need to change the function to be fully async-await. See the example below. I won't make a pull request since there are 5 PR's where one is still open since 2018 and didn't have any response by the owner of the repository. File: /**
* Bootstrap the database
*/
const init = async () => {
try {
const names = await influx.getDatabaseNames();
if (names.indexOf('lighthouse') === -1) {
logger.info('InfluxDB: lighthouse database does not exist. Creating database');
await influx.createDatabase('lighthouse');
logger.info('InfluxDB: lighthouse database created');
}
logger.info('InfluxDB', 'lighthouse database already exists. Skipping creation.');
} catch (err) {
throw new Error('Failed to initialise influx: ' + err)
}
}; |
Also works with lighthouse 6.4 and node 14.15-slim lts. Maybe you can update it in your fork and open a merge request? I don't have many high hopes of it getting merged when looking at it, but maybe it's easier for people to find then. |
Hi the lighthouse npm package is out of date. I tried to update the package.json to lighthouse 5.2 and the dockerfile to the node 10 base layer ( as lighthouse 5.2 depends on node 10) but when I do so it fails to work with influx?
garie-lighthouse_1 | Application listening on port 3000
garie-lighthouse_1 | (node:19) UnhandledPromiseRejectionWarning: Failed to initialise influx
garie-lighthouse_1 | (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
I tried removing the try catch on the influxdb initialise which allows lighthouse to then run but it then doesn't write to influx
thanks :)
The text was updated successfully, but these errors were encountered: