If you are getting this error when running yarn build or npm run build that is probably because the versions of both the stencil core and stencil router are outdated.
For solving this issue, just update both dependencies:
yarn add @stencil/core@next
yarn add @stencil/router --dev
Here are my current dependencies, just for reference:
{
"dependencies":
{
"@stencil/core": "^0.18.1",
},
"devDependencies":
{
"@stencil/router": "^0.3.3",
"workbox-build": "3.4.1"
}
}
If you are interested in knowing more about this issue, please refer
That’s it, from now on your build should work as expected.