stencil-cli
stencil-cli copied to clipboard
stencil push fails with error "worker initialization failed"
Expected behavior
stencil push
works. Or an easier to see and more informative error is shown.
Actual behavior
stencil push
fails with the error worker initialization failed
.
Steps to reproduce behavior
Using stencil-cli
version 8.4.0, as soon as you run stencil start
it renames stencil.conf.js
to stencil.conf.cjs
. Afterward, if someone else using an older stencil-cli
version like 7.5.5
then stencil push
fails with a very subtle error that just says worker initialization failed
.
I realize that this could be avoided by just making sure that everyone is using the latest version, but some of us developers are a paranoid folk who often try not to update things unless we have to. Additionally, it might not be obvious what caused this failure to happen.
Could we do something to handle this situation better? Perhaps:
- Leave stencil.conf.js in place, and just make a copy with the
.cjs
file extension - Don't rename it to
.cjs
extension... I figure this is done because of the recent move to esm, but is it necessary? - Create a field somewhere that indicates what version of
stencil-cli
should be compatible with the theme code. You could perhaps use this information to provide a better error in the future. a. On that note, the current version of cornerstone doesn't use the.cjs
extension.
Also, I realize I'm getting a bit picky in asking for the above, but I figure it couldn't hurt to maybe consider it. Also, half the reason for writing this is for anyone else that may encounter the problem and not realize what's going on.
Environment
Stencil-cli version stencil --version
:
8.4.4 / 7.5.5
Node version node -v
:
18.19
NPM version npm -v
:
10.2.3
OS:
macOS