π Bug Report: Backstage basic installation fails
See original GitHub issueπ Description
When I run the basic installation of backstage:
It fails with the following error:
β― npx @backstage/create-app
? Enter a name for the app [required] unbox
Creating the app...
Checking if the directory is available:
checking unbox β
Creating a temporary app directory:
creating temporary directory β
Preparing files:
copying .dockerignore β
templating .eslintrc.js.hbs β
templating .gitignore.hbs β
copying .prettierignore β
copying README.md β
copying app-config.local.yaml β
copying app-config.production.yaml β
templating backstage.json.hbs β
templating app-config.yaml.hbs β
templating catalog-info.yaml.hbs β
copying lerna.json β
templating package.json.hbs β
copying tsconfig.json β
copying README.md β
copying entities.yaml β
copying org.yaml β
copying template.yaml β
copying catalog-info.yaml β
copying index.js β
copying package.json β
copying README.md β
templating .eslintrc.js.hbs β
copying Dockerfile β
copying README.md β
templating package.json.hbs β
copying index.test.ts β
copying index.ts β
copying types.ts β
copying app.ts β
copying auth.ts β
copying catalog.ts β
copying proxy.ts β
copying scaffolder.ts β
copying techdocs.ts β
templating search.ts.hbs β
templating .eslintrc.js.hbs β
templating package.json.hbs β
copying cypress.json β
copying android-chrome-192x192.png β
copying favicon-16x16.png β
copying apple-touch-icon.png β
copying favicon-32x32.png β
copying index.html β
copying favicon.ico β
copying manifest.json β
copying robots.txt β
copying safari-pinned-tab.svg β
copying .eslintrc.json β
copying app.js β
copying App.test.tsx β
copying apis.ts β
copying index.tsx β
copying App.tsx β
copying setupTests.ts β
copying LogoIcon.tsx β
copying LogoFull.tsx β
copying index.ts β
copying Root.tsx β
copying EntityPage.tsx β
copying SearchPage.tsx β
Moving to final location:
moving unbox β
Building the app:
executing yarn install β
executing yarn tsc β error Command failed with exit code 2.
yarn run v1.22.19
$ tsc
packages/backend/src/plugins/catalog.ts:9:47 - error TS2345: Argument of type 'PluginEnvironment' is not assignable to parameter of type 'CatalogEnvironment'.
The types of 'reader.readUrl' are incompatible between these types.
Type '((url: string, options?: ReadUrlOptions | undefined) => Promise<ReadUrlResponse>) | undefined' is not assignable to type '(url: string, options?: ReadUrlOptions | undefined) => Promise<ReadUrlResponse>'.
Type 'undefined' is not assignable to type '(url: string, options?: ReadUrlOptions | undefined) => Promise<ReadUrlResponse>'.
9 const builder = await CatalogBuilder.create(env);
~~~
packages/backend/src/plugins/scaffolder.ts:17:5 - error TS2322: Type 'import("/Users/hpeters/WebstormProjects/clean-backstage-out-of-the-box/unbox/packages/backend/node_modules/@backstage/backend-common/dist/index").UrlReader' is not assignable to type 'import("/Users/hpeters/WebstormProjects/clean-backstage-out-of-the-box/unbox/node_modules/@backstage/backend-common/dist/index").UrlReader'.
17 reader: env.reader,
~~~~~~
node_modules/@backstage/plugin-scaffolder-backend/dist/index.d.ts:730:5
730 reader: UrlReader;
~~~~~~
The expected type comes from property 'reader' which is declared here on type 'RouterOptions'
packages/backend/src/plugins/techdocs.ts:18:5 - error TS2322: Type 'import("/Users/hpeters/WebstormProjects/clean-backstage-out-of-the-box/unbox/packages/backend/node_modules/@backstage/backend-common/dist/index").UrlReader' is not assignable to type 'import("/Users/hpeters/WebstormProjects/clean-backstage-out-of-the-box/unbox/node_modules/@backstage/backend-common/dist/index").UrlReader'.
18 reader: env.reader,
~~~~~~
node_modules/@backstage/plugin-techdocs-node/dist/index.d.ts:22:5
22 reader: UrlReader;
~~~~~~
The expected type comes from property 'reader' which is declared here on type 'PreparerConfig'
Found 3 errors in 3 files.
Errors Files
1 packages/backend/src/plugins/catalog.ts:9
1 packages/backend/src/plugins/scaffolder.ts:17
1 packages/backend/src/plugins/techdocs.ts:18
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
executing yarn tsc β
Error: Could not execute command yarn tsc
It seems that something went wrong when creating the app π€
π₯ Failed to create app!
π Expected behavior
The app should create successfully
π Actual Behavior with Screenshots
π Reproduction steps
Run:
π Provide the context for the Bug.
No response
π₯οΈ Your Environment
β― yarn backstage-cli info
yarn run v1.22.19
$ /Users/hpeters/WebstormProjects/clean-backstage-out-of-the-box/unbox/node_modules/.bin/backstage-cli info
OS: Darwin 22.1.0 - darwin/arm64
node: v16.18.0
yarn: 1.22.19
cli: 0.18.1 (installed)
backstage: 1.5.0
Dependencies:
@backstage/app-defaults 1.0.8
@backstage/backend-common 0.15.2, 0.16.0
@backstage/backend-plugin-api 0.1.4
@backstage/backend-tasks 0.3.7
@backstage/catalog-client 1.1.2
@backstage/catalog-model 1.1.3
@backstage/cli-common 0.1.10
@backstage/cli 0.18.1
@backstage/config-loader 1.1.6
@backstage/config 1.0.4
@backstage/core-app-api 1.2.0
@backstage/core-components 0.11.2, 0.12.0
@backstage/core-plugin-api 1.1.0
@backstage/errors 1.1.3
@backstage/integration-react 1.1.6
@backstage/integration 1.4.0
@backstage/plugin-api-docs 0.8.11
@backstage/plugin-app-backend 0.3.38
@backstage/plugin-auth-backend 0.15.1
@backstage/plugin-auth-node 0.2.7
@backstage/plugin-catalog-backend 1.5.1
@backstage/plugin-catalog-common 1.0.8
@backstage/plugin-catalog-graph 0.2.23
@backstage/plugin-catalog-import 0.8.12
@backstage/plugin-catalog-node 1.2.1
@backstage/plugin-catalog-react 1.2.1
@backstage/plugin-catalog 1.6.1
@backstage/plugin-github-actions 0.5.11
@backstage/plugin-org 0.5.10
@backstage/plugin-permission-common 0.6.4, 0.7.1
@backstage/plugin-permission-node 0.6.5, 0.7.1
@backstage/plugin-permission-react 0.4.7
@backstage/plugin-proxy-backend 0.2.32
@backstage/plugin-scaffolder-backend 1.8.0
@backstage/plugin-scaffolder-common 1.2.2
@backstage/plugin-scaffolder 1.8.0
@backstage/plugin-search-backend-module-pg 0.3.6
@backstage/plugin-search-backend-node 1.0.4
@backstage/plugin-search-backend 1.1.1
@backstage/plugin-search-common 1.1.1
@backstage/plugin-search-react 1.2.1
@backstage/plugin-search 1.0.4
@backstage/plugin-tech-radar 0.5.18
@backstage/plugin-techdocs-backend 1.4.1
@backstage/plugin-techdocs-module-addons-contrib 1.0.6
@backstage/plugin-techdocs-node 1.4.2
@backstage/plugin-techdocs-react 1.0.6
@backstage/plugin-techdocs 1.4.0
@backstage/plugin-user-settings 0.4.8
@backstage/release-manifests 0.0.5
@backstage/test-utils 1.2.2
@backstage/theme 0.2.16
@backstage/types 1.0.1
@backstage/version-bridge 1.0.2
β¨ Done in 2.71s.
π 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?
No, but Iβm happy to collaborate on a PR with someone else
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
AM 6.x install fails with Encrypt Private Key failed
I nstalling AM with an embedded DS configuration store fails. The following error is shown in the Install log when this happens: 23/04/2021...
Read more >Troubleshoot Visual Studio installation and upgrade issues
This troubleshooting guide includes step-by-step instructions that should resolve most installation issues.
Read more >ErrorApi Β· Backstage Software Catalog and Developer Platform
The error API is used to report errors to the app, and display them to the ... The main use of this API...
Read more >14 - Stack Overflow
info If you think this is a bug, please open a bug report with the information provided in "C:\\Temp\\react-test\\yarn-error.log". info VisitΒ ...
Read more >How to monitor your services on Kubernetes with Backstage ...
... Aggregated view of your deployments 1:40 Autoscaler limits at a glance 1:52 Automated error reporting For years, Backstage has providedΒ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue, was able to fix by changing my
packages/backend
dependency on@backstage/backend-common
from"^0.15.0"
to"^0.16"
. I noticed that when I runyarn install
, it updated the@backstage/backend-common
of other package to 0.16 but not the backend package.This is probably due to the default caret and not a tilde on the dependency (https://michaelsoolee.com/npm-package-tilde-caret/) since weβre still in minor versions?
FWIW, my project has existed for a while, this was just a result of deleting the
yarn.lock
file and reinstalling.Just noting before the weekend: Deleting a lock file is inherently risky and definitely can lead to breakages, it should be avoided.