-
Anyone else getting this error when upgrading from 3.3.7 to 3.3.8?
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
This is a question for the authors of the change from 3.3.7 to 3.3.8. The History.md file, unfortunately, was not updated to include this information. My request is to update the History.md file to include the author of these changes so a request can go out to that contributor to look into this issue. |
Beta Was this translation helpful? Give feedback.
-
If there's actually a space between Also what does your BASE_URL config key return? Is it a promise? If you think you've found a bug or regression, write a test for the test suite which passes with 3.3.7 but passes with 3.3.8. |
Beta Was this translation helpful? Give feedback.
-
Does anyone know how to fix this? I'm still unable to pass promises to asyncConfig(). Tested this code with version 3.3.8, 3.3.9 and 3.3.10 but no success. I'm using node 18.16.1 const { asyncConfig } = require("config/async")
async function test() {
await new Promise((resolve) => setTimeout(resolve, 1000))
return "hello"
}
module.exports = {
something: asyncConfig(test)
} other file const { resolveAsyncConfigs } = require("config/async")
resolveAsyncConfigs(config).then(() => {
require("./main.js")
}).catch((error) => {
winston.info("Failed to resolve configs", error)
}) The error message is: Method Promise.prototype.then called on incompatible receiver #<Promise> {
"stack":"TypeError: Method Promise.prototype.then called on in compatible receiver #<Promise>
at Proxy.then (<anonymous>)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
} |
Beta Was this translation helpful? Give feedback.
Deleting node_modules with version 3.3.10 might have done the job for me, not exactly sure what fixed the error tbh. But the above code works fine now.
Edit: I was missing the ALLOW_CONFIG_MUTATIONS=true environment variable, which seems to be required.