community-plugins: ๐ sonarqube (+ others): tsc:full fails for wrong import
Workspace
sonarqube
๐ Description
tsc:full fails after backstage 1.39.0 update. The same import is also in other community plugins:
- linguist
- grafana
- sentry
- adr
- jenkins
- github-deployments
- linkerd
- github-actions
- github-issues
- cicd-statistics
- azure-devops
- github-pull-requests-board
๐ Expected behavior
tsc should pass
๐ Actual Behavior with Screenshots
node_modules/@backstage-community/plugin-sonarqube/dist/index.d.ts:4:49 - error TS2307: Cannot find module โ@backstage/catalog-model/indexโ or its corresponding type declarations.
4 import * as _backstage_catalog_model_index from โ@backstage/catalog-model/indexโ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/@backstage-community/plugin-sonarqube/dist/index.d.ts:4
๐ Reproduction steps
- add sonarqube plugin to backstage 1.39.0
- run
tsc --skipLibCheck false --incremental false
๐ Provide the context for the Bug.
No response
๐ Have you spent some time to check if this bug has been raised before?
- I checked and didnโt find similar issue
๐ข Have you read the Code of Conduct?
- I have read the Code of Conduct
Are you willing to submit PR?
None
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 19 (19 by maintainers)
I did trigger this for the
sonarqubeplugin as I think itโs the only one that would have early impact to the Community. If my thinking holds the CI should fail as the API Report needs to be updated: https://github.com/backstage/community-plugins/pull/4043Note: I wonโt be versioning bumping the maintainer owned plugins until next week, roughly May 30th, as Iโm taking a long-weekend to tend to my yard and garden. Feel free to move forward with that if you need one or more updated ๐
Yup, I was busy testing with a new
create-appinstance, the Demo site is not a good test case. On a freshcreate-appinstance I get this error as well. Also for the plugins with the Alpha export you wonโt hit this error. I installed Linguist on this instance and it was fine. I think if I tried to use the New Frontend System then I would hit it.So I think the solution is that these need to be version bumped to
1.39.0as itโs not a direct code fix. We donโt directly import in the code for any of these plugins from the/indexpath.I think I missed that when I closed this, with their being no results in the search I just sort of assumed all was good.
Hi @pjungermann, as the Community Plugin Maintainers donโt own this plugin and it wasnโt in the initial set of plugins listed in this issue or in the provided search results I didnโt give it a look. The code is correct in the repo so the only conclusion I can make is that those changes have not been published yet. This PR needs to be approved and merged by the owners listed: https://github.com/backstage/community-plugins/pull/4039. Feel free to ping them to move this along ๐
Closing as all impacted plugins have been updated and release, this list returns no results: https://github.com/search?q=repo%3Abackstage%2Fcommunity-plugins %40backstage%2Fcatalog-model%2Findex&type=code ๐
Great to see a fix upcoming.
I got the same error for another plugin.
I saw it for
@backstage-community/plugin-github-actions@backstage-community/plugin-sentrybut was fixed after upgrading to the latest versions for these. Not for the other two, though.
Looking at the API reports or the
index.d.tswhen installed, was also interesting to see the difference between@backstage-community/plugin-sonarqubeand
@backstage-community/plugin-sonarqube-react@awanlin yes itโs
tsc:full, changed it. At least for our instance the version bump itself did not clean this, had to manually change the import.If anyone wants to pick any of these up I believe simply removing the/indexwill solve this problem i.e.import { Entity } from '@backstage/catalog-model/index';-->import { Entity } from '@backstage/catalog-model';Edit: Maybe not ๐ค ๐ญ