Open jon9090 opened 1 year ago
If the environment is not interactive, it will output the - ${this.text}\n
in the terminal and not work normally. There is a section of code in the source that expresses this meaning.
if (!this.#isEnabled) {
if (this.text) {
this.#stream.write(`- ${this.text}\n`);
}
return this;
}
and #isEnabled property is equal to
this.#isEnabled = typeof this.#options.isEnabled === 'boolean' ? this.#options.isEnabled : **isInteractive**({stream: this.#stream})
The Worker environment is not interactive. The isInteractive() will return false.
Is it possible to run
ora
on Worker?Currently, it freezed:
Open this stackblitz example code Then in the stackblitz terminal run
node index.js
.Now you can see that
working
is work as expected (because it's on the main thread), butloading
is not because it on the worker thread.index.js:
worker.js: