microcks / microcks/microcks-backstage-provider
Backstage upgrade 1.51 breaks the lib.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 5
- Avg merge
- 3h 15m
- Merged PRs (30d)
- 9
Description
### Describe the bug
## Bug: `catalogProcessingExtensionPoint` imported from wrong subpath — breaks Backstage 1.51.0 startup
### Environment
| | Version |
|---|---|
| `@microcks/microcks-backstage-provider` | `0.0.7` |
| Backstage | `1.51.0` |
| `@backstage/plugin-catalog-node` | `2.2.1` |
| `@backstage/plugin-catalog-backend` | `3.7.0` |
| Node.js | `v24.13.0` |
---
### Description
After upgrading to Backstage 1.51.0, the backend fails to start with the following error:
```
Plugin 'catalog' startup failed; caused by TypeError: Cannot read properties of undefined (reading 'id') at BackendInitializer.#doStart (BackendInitializer.ts:436:13)
```
---
### Root Cause
In `dist/module.cjs.js`, `catalogProcessingExtensionPoint` is imported from the `/alpha` subpath of `@backstage/plugin-catalog-node`:
```js
// current code in dist/module.cjs.js
var alpha = require('@backstage/plugin-catalog-node/alpha');
deps: {
catalog: alpha.catalogProcessingExtensionPoint, // ← undefined in catalog-node v2+
...
}
```
As of @backstage/plugin-catalog-node v2+, catalogProcessingExtensionPoint has been promoted to the main export and is no longer available under /alpha. As a result, alpha.catalogProcessingExtensionPoint is undefined, which causes the error when the Backstage backend initializer tries to read .id on it during plugin registration.
You can confirm this with a quick check:
```js
const alpha = require('@backstage/plugin-catalog-node/alpha');
console.log(alpha.catalogProcessingExtensionPoint); // undefined
const main = require('@backstage/plugin-catalog-node');
console.log(main.catalogProcessingExtensionPoint); // { id: 'catalog.processing', ... }
```
---
### Expected Behavior
The module should register correctly and the backend should start without errors.
---
### Proposed Fix
Dans le fichier de création du module :
```
-var alpha = require('@backstage/plugin-catalog-node/alpha');
+var pluginCatalogNode = require('@backstage/plugin-catalog-node');
deps: {
- catalog: alpha.catalogProcessingExtensionPoint,
+ catalog: pluginCatalogNode.catalogProcessingExtensionPoint,
}
```
Thx to claude to help me create this issue :)
### Expected behavior
_No response_
### Actual behavior
Plugin 'catalog' startup failed; caused by TypeError: Cannot read properties of undefined (reading 'id') type="unhandledRejection" cause=undefined name="BackendStartupError" stack="BackendStartupError: Backend startup failed due to the following errors:\n Plugin 'catalog' startup failed; caused by TypeError: Cannot read properties of undefined (reading 'id')\n at BackendInitializer.#doStart (/home/jpalon/backstage/node_modules/@backstage/backend-app-api/src/wiring/BackendInitializer.ts:436:13)\n at async BackendInitializer.start (/home/jpalon/backstage/node_modules/@backstage/backend-app-api/src/wiring/BackendInitializer.ts:278:12)\n at async BackstageBackend.start (/home/jpalon/backstage/node_modules/@backstage/backend-app-api/src/wiring/BackstageBackend.ts:48:12)"
### How to Reproduce?
_No response_
### Microcks version or git rev
_No response_
### Install method (`docker-compose`, `helm chart`, `operator`, `docker-desktop extension`,...)
_No response_
### Additional information
_No response_
Contributor guide
Research direction
Inspect dist/module.cjs.js and the source module entry that generates it, then compare the exports from @backstage/plugin-catalog-node/alpha and @backstage/plugin-catalog-node. Update the module dependency registration to use the available catalogProcessingExtensionPoint export, rebuild the package, and verify that the Backstage catalog backend starts without the .id error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100