[Ops] Fix serverless startup issue around importing @kbn/dev-utils #165311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes kibana-serverless issues of this nature: https://elastic.slack.com/archives/C04L3JE8LV6/p1693450827486199 or https://elastic.slack.com/archives/C04L3JE8LV6/p1693473384616049
After #162673 - serverless images started breaking: https://github.com/elastic/serverless-gitops/commits/main/services/kibana/versions.yaml
The issue is probably that the library
@kbn/dev-utils
is a devDependency, thus it doesn't show up in the serverless image, but it's required for the serve script. This doesn't show up locally (or probably in other kibana distros) because dev/prod dependencies are also installed together.To solve this, I inlined the token (as it doesn't depend on anything else, it's just saved in a central place for code deduplication) - if it's a better solution, we can just move the
@kbn/dev-utils
to the prod dependencies, but I don't know enough about the context to make that decision.