Open rexdavid opened 1 year ago
Could you try again after running bun upgrade --canary
? We recently improved the error message for URL
parsing, and that should give us some additional info on why this is failing.
bun upgrade --canary
watch bun --watch ./src/start.ts
38 | // Load given options to the object 39 | this.options = options 40 | 41 | // Construct Grafana Loki push API url 42 | const URL = this.loadUrl() 43 | this.url = (new URL(this.options.host + '/loki/api/v1/push')) ^ TypeError: "undefined/loki/api/v1/push" cannot be parsed as a URL. at new Batcher (app/node_modules/winston-loki/src/batcher.js:43:16) at new LokiTransport (app/node_modules/winston-loki/index.js:21:19) at logTransports (app/src/loggers/logger.ts:34:4) at loggingTool (app/src/loggers/logger.ts:58:16) at app/src/schemaValidator.ts:29:15 at processTicksAndRejections (:55:76) 38 | // Load given options to the object 39 | this.options = options 40 | 41 | // Construct Grafana Loki push API url 42 | const URL = this.loadUrl() 43 | this.url = (new URL(this.options.host + '/loki/api/v1/push')) ^ TypeError: "undefined/loki/api/v1/push" cannot be parsed as a URL. at new Batcher (app/node_modules/winston-loki/src/batcher.js:43:16) at new LokiTransport (app/node_modules/winston-loki/index.js:21:19) at logTransports (app/src/loggers/logger.ts:34:4) at loggingTool (app/src/loggers/logger.ts:58:16) at app/src/schemaValidator.ts:29:15 at processTicksAndRejections (:55:76)
does this still reproduce for you? it appears to be working on my end in Bun 1.1.10 (you may need to run bun upgrade
)
This issue is stale and may be closed due to inactivity. If you're still running into this, please leave a comment.
What version of Bun is running?
1.0.3
What platform is your computer?
linux
What steps can reproduce the bug?
What is the expected behavior?
No errors thrown
What do you see instead?
Console output:
38 | // Load given options to the object 39 | this.options = options 40 | 41 | // Construct Grafana Loki push API url 42 | const URL = this.loadUrl() 43 | this.url = (new URL(this.options.host + '/loki/api/v1/push')) ^ TypeError: Type error at new Batcher (app/node_modules/winston-loki/src/batcher.js:43:16) at new LokiTransport (app/node_modules/winston-loki/index.js:21:19) at logTransports (app/src/loggers/logger.ts:34:4) at loggingTool (app/src/loggers/logger.ts:58:16) at app/src/schemaValidator.ts:29:15 at processTicksAndRejections (:55:76) 38 | // Load given options to the object 39 | this.options = options 40 | 41 | // Construct Grafana Loki push API url 42 | const URL = this.loadUrl() 43 | this.url = (new URL(this.options.host + '/loki/api/v1/push')) ^ TypeError: Type error at new Batcher (app/node_modules/winston-loki/src/batcher.js:43:16) at new LokiTransport (app/node_modules/winston-loki/index.js:21:19) at logTransports (app/src/loggers/logger.ts:34:4) at loggingTool (app/src/loggers/logger.ts:58:16) at app/src/schemaValidator.ts:29:15 at processTicksAndRejections (:55:76)
Additional information
No response