Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Missing React dependencies #24674

Open
2 tasks done
jkilzi opened this issue May 7, 2024 · 1 comment
Open
2 tasks done

🐛 Bug Report: Missing React dependencies #24674

jkilzi opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jkilzi
Copy link

jkilzi commented May 7, 2024

📜 Description

I was following the guidelines in the community-plugins repo, then I found that after creating a new frontend plugin with yarn new (actually backstage-cli new --scope @backstage-community) inside my workspace, the command produced a package.json for the plugin with no react, react-dom and react-router-dom dependencies listed. Running yarn start right after the plugin was created displayed a webpack error complaining about these missing dependencies.

👍 Expected behavior

Other plugins that have been already migrated to the new community-plugins repo have these peerDependencies and devDependencies:

"peerDependencies": {
    "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
    "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
    "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
  },

Probably these dependencies should be been added automatically to new frontend plugins are created.

👎 Actual Behavior with Screenshots

No react, react-dom and react-router-dom dependencies are available after creating a new frontend plugin.

👟 Reproduction steps

  1. Fork the community-plugins repo
  2. Just follow the steps in the CONTRIBUTING guide

📃 Provide the context for the Bug.

No response

🖥️ Your Environment

OS: Darwin 23.4.0 - darwin/arm64
node: v18.18.2
yarn: 3.2.3
cli: 0.26.4 (installed)
backstage: 1.26.0

Dependencies:
@backstage/app-defaults 1.5.4
@backstage/backend-app-api 0.7.2
@backstage/backend-common 0.21.7
@backstage/backend-dev-utils 0.1.4
@backstage/backend-plugin-api 0.6.17
@backstage/backend-tasks 0.5.22
@backstage/catalog-client 1.6.4
@backstage/catalog-model 1.4.5
@backstage/cli-common 0.1.13
@backstage/cli-node 0.2.5
@backstage/cli 0.26.4
@backstage/config-loader 1.8.0
@backstage/config 1.2.0
@backstage/core-app-api 1.12.4
@backstage/core-components 0.14.6
@backstage/core-plugin-api 1.9.2
@backstage/dev-utils 1.0.31
@backstage/e2e-test-utils 0.1.1
@backstage/errors 1.2.4
@backstage/eslint-plugin 0.1.7
@backstage/frontend-plugin-api 0.6.4
@backstage/integration-aws-node 0.1.12
@backstage/integration-react 1.1.26
@backstage/integration 1.10.0
@backstage/plugin-auth-node 0.4.12
@backstage/plugin-catalog-common 1.0.22
@backstage/plugin-catalog-react 1.11.3
@backstage/plugin-permission-common 0.7.13
@backstage/plugin-permission-node 0.7.28
@backstage/plugin-permission-react 0.4.22
@backstage/plugin-search-common 1.2.11
@backstage/release-manifests 0.0.11
@backstage/repo-tools 0.8.0
@backstage/test-utils 1.5.4
@backstage/theme 0.5.3
@backstage/types 1.1.1
@backstage/version-bridge 1.0.8

👀 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?

Are you willing to submit PR?

Yes I am willing to submit a PR!

@jkilzi jkilzi added the bug Something isn't working label May 7, 2024
@benjdlambert
Copy link
Member

Yep 🙏 Thanks for creating the issue.

All the templates are in here: https://github.com/backstage/backstage/tree/master/packages/cli/templates, so I think we just need to update the package.json.hbs files to include the peerDependencies as devDependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants