The showcase doesn't start locally when running `yarn start`
Zaperex opened this issue · comments
Describe the bug
When using yarn start
in the root directory to start the backstage application, the frontend fails with the following error:
When testing doing yarn start
from commit 4a6266e (before the 1.22 upgrade)
The logs produce the following and backstage starts up properly:
backend:start: cache bypass, force executing f3913656802e2f5f
@internal/plugin-dynamic-plugins-info-backend:start: cache bypass, force executing fd38329a4c7ee316
@internal/plugin-scalprum-backend:start: cache bypass, force executing 87683b206ad30f9b
app:start: cache bypass, force executing 6c746a5d57ae5faf
backend:start: $ cross-env LEGACY_BACKEND_START=true backstage-cli package start
@internal/plugin-scalprum-backend:start: $ backstage-cli package start
@internal/plugin-dynamic-plugins-info-backend:start: $ backstage-cli package start
app:start: $ janus-cli package start
@internal/plugin-scalprum-backend:start: (node:211262) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
@internal/plugin-scalprum-backend:start: (Use `node --trace-warnings ...` to show where the warning was created)
@internal/plugin-dynamic-plugins-info-backend:start: (node:211263) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
@internal/plugin-dynamic-plugins-info-backend:start: (Use `node --trace-warnings ...` to show where the warning was created)
backend:start: Build succeeded
The logs start returning the following when switching to the backstage 1.22.1 commit 8f9811c, but the showcase still starts properly.
app:start: cache bypass, force executing f6333405e07da288
@internal/plugin-dynamic-plugins-info-backend:start: cache bypass, force executing 94c6b8fd02e56c01
@internal/plugin-scalprum-backend:start: cache bypass, force executing 6d2932d82f85349e
backend:start: cache bypass, force executing 243cea59deea3070
@internal/plugin-dynamic-plugins-info-backend:start: $ backstage-cli package start
backend:start: $ cross-env LEGACY_BACKEND_START=true backstage-cli package start
app:start: $ janus-cli package start
@internal/plugin-scalprum-backend:start: $ backstage-cli package start
@internal/plugin-dynamic-plugins-info-backend:start: The 'dev' directory is missing. Please create a proper dev/index.ts in order to start the plugin.
@internal/plugin-scalprum-backend:start: The 'dev' directory is missing. Please create a proper dev/index.ts in order to start the plugin.
backend:start: Build succeeded
The last commit that still worked was 6b8b82c.
The issue starts occurring at commit ebebc0a from "chore(deps): update all non-major dependencies (#693)"
Expected Behavior
The backstage showcase starts up properly when running yarn start
What are the steps to reproduce this bug?
- Checkout to ebebc0a or later
- run
yarn start
- Observe frontend failing with
Error Scalprum was not initialized! Call the initialize function first.
Versions of software used and environment
https://github.com/janus-idp/backstage-showcase/tree/4f1c1b60489450647b8102083c3ae55d2cb05049
node v18.18.0 (also tested with node v18.19.0 and issue persists)
yarn v1.22.19
It seems to work after doing a git revert ebebc0acef5e0362c9001271c0e6df38370a2d23
to revert ebebc0a
A function we used was actually deprecated and removed in v0.7.0
of @scalprum/core
https://github.com/scalprum/scaffolding/pull/114/files#diff-16951a076f27175290484178ab8a33bbdf697b9ac96cac8390134042b4789dd2L34-L36
Fixed by #915.
Next steps is to potentially see if we can update the DynamicRoot
to use the new transformPluginManifest
function instead of the deprecated postProcessManifest
that is currently in use.