question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npx @backstage/create-app fails on yarn tsc

See original GitHub issue

Expected Behavior

Running npx @backstage/create-app should create a new app after exiting withou any issues.

Actual Behavior

When arriving at yarn tsc in the “Building the app”-stage it fails with the following error:

executing     yarn tsc ◝ error Command failed with exit code 2.
yarn run v1.22.18
$ tsc
packages/app/src/App.tsx:92:4 - error TS2559: Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes'.

92   <AppProvider>
      ~~~~~~~~~~~

packages/app/src/App.tsx:95:6 - error TS2559: Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes'.

95     <AppRouter>
        ~~~~~~~~~


Found 2 errors.

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!

Steps to Reproduce

  1. install nvm
  2. run nvm install 16 or nvm install 14 (the results are the same)
  3. run npm install --global yarn
  4. run npx @backstage/create-app
  5. enter the wanteed application name
  6. choose Postgresql
  7. wait
  8. watch the error message from above

Context

Your Environment

Clean WSL (Ubuntu) in Windows

  • Output of yarn backstage-cli info:

node 14

OS:   Linux 5.10.16.3-microsoft-standard-WSL2 - linux/x64
node: v14.19.1
yarn: 1.22.18
cli:  0.16.0 (installed)

Dependencies:
  @backstage/app-defaults                    1.0.0
  @backstage/backend-common                  0.13.1
  @backstage/backend-tasks                   0.2.1
  @backstage/catalog-client                  1.0.0
  @backstage/catalog-model                   1.0.0
  @backstage/cli-common                      0.1.8
  @backstage/cli                             0.16.0
  @backstage/config-loader                   1.0.0
  @backstage/config                          1.0.0
  @backstage/core-app-api                    1.0.0
  @backstage/core-components                 0.9.2
  @backstage/core-plugin-api                 1.0.0
  @backstage/errors                          1.0.0
  @backstage/integration-react               1.0.0
  @backstage/integration                     1.0.0
  @backstage/plugin-api-docs                 0.8.3
  @backstage/plugin-app-backend              0.3.30
  @backstage/plugin-auth-backend             0.12.3
  @backstage/plugin-auth-node                0.1.6
  @backstage/plugin-catalog-backend          1.0.0
  @backstage/plugin-catalog-common           1.0.0
  @backstage/plugin-catalog-graph            0.2.15
  @backstage/plugin-catalog-import           0.8.6
  @backstage/plugin-catalog-react            1.0.0
  @backstage/plugin-catalog                  1.0.0
  @backstage/plugin-github-actions           0.5.3
  @backstage/plugin-org                      0.5.3
  @backstage/plugin-permission-common        0.5.3
  @backstage/plugin-permission-node          0.5.5
  @backstage/plugin-permission-react         0.3.4
  @backstage/plugin-proxy-backend            0.2.24
  @backstage/plugin-scaffolder-backend       1.0.0
  @backstage/plugin-scaffolder-common        1.0.0
  @backstage/plugin-scaffolder               1.0.1
  @backstage/plugin-search-backend-module-pg 0.3.1
  @backstage/plugin-search-backend-node      0.5.2
  @backstage/plugin-search-backend           0.4.8
  @backstage/plugin-search-common            0.3.2
  @backstage/plugin-search                   0.7.4
  @backstage/plugin-tech-radar               0.5.10
  @backstage/plugin-techdocs-backend         1.0.0
  @backstage/plugin-techdocs-node            1.0.0
  @backstage/plugin-techdocs                 1.0.1
  @backstage/plugin-user-settings            0.4.2
  @backstage/release-manifests               0.0.2
  @backstage/search-common                   0.3.2
  @backstage/test-utils                      1.0.0
  @backstage/theme                           0.2.15
  @backstage/types                           1.0.0
  @backstage/version-bridge                  1.0.0
Done in 0.50s.

node 16

OS:   Linux 5.10.16.3-microsoft-standard-WSL2 - linux/x64
node: v16.14.2
yarn: 1.22.18
cli:  0.16.0 (installed)

Dependencies:
  @backstage/app-defaults                    1.0.0
  @backstage/backend-common                  0.13.1
  @backstage/backend-tasks                   0.2.1
  @backstage/catalog-client                  1.0.0
  @backstage/catalog-model                   1.0.0
  @backstage/cli-common                      0.1.8
  @backstage/cli                             0.16.0
  @backstage/config-loader                   1.0.0
  @backstage/config                          1.0.0
  @backstage/core-app-api                    1.0.0
  @backstage/core-components                 0.9.2
  @backstage/core-plugin-api                 1.0.0
  @backstage/errors                          1.0.0
  @backstage/integration-react               1.0.0
  @backstage/integration                     1.0.0
  @backstage/plugin-api-docs                 0.8.3
  @backstage/plugin-app-backend              0.3.30
  @backstage/plugin-auth-backend             0.12.3
  @backstage/plugin-auth-node                0.1.6
  @backstage/plugin-catalog-backend          1.0.0
  @backstage/plugin-catalog-common           1.0.0
  @backstage/plugin-catalog-graph            0.2.15
  @backstage/plugin-catalog-import           0.8.6
  @backstage/plugin-catalog-react            1.0.0
  @backstage/plugin-catalog                  1.0.0
  @backstage/plugin-github-actions           0.5.3
  @backstage/plugin-org                      0.5.3
  @backstage/plugin-permission-common        0.5.3
  @backstage/plugin-permission-node          0.5.5
  @backstage/plugin-permission-react         0.3.4
  @backstage/plugin-proxy-backend            0.2.24
  @backstage/plugin-scaffolder-backend       1.0.0
  @backstage/plugin-scaffolder-common        1.0.0
  @backstage/plugin-scaffolder               1.0.1
  @backstage/plugin-search-backend-module-pg 0.3.1
  @backstage/plugin-search-backend-node      0.5.2
  @backstage/plugin-search-backend           0.4.8
  @backstage/plugin-search-common            0.3.2
  @backstage/plugin-search                   0.7.4
  @backstage/plugin-tech-radar               0.5.10
  @backstage/plugin-techdocs-backend         1.0.0
  @backstage/plugin-techdocs-node            1.0.0
  @backstage/plugin-techdocs                 1.0.1
  @backstage/plugin-user-settings            0.4.2
  @backstage/release-manifests               0.0.2
  @backstage/search-common                   0.3.2
  @backstage/test-utils                      1.0.0
  @backstage/theme                           0.2.15
  @backstage/types                           1.0.0
  @backstage/version-bridge                  1.0.0
Done in 0.51s.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
frankbolerocommented, Apr 8, 2022

I can confirm that the new version does work as Expected! Thank you @Rugvip !

2reactions
timbonicuscommented, Apr 7, 2022

I can reproduce this with the latest @backstage/create-app. It appears that the wildcard for @types/react-dom in the default app template is now pulling in the hot-off-the-presses React 18 types:

"@types/react-dom": "*",

If I add a peerDependency block to the root package.json this fixes it:

  "peerDependencies": {
    "react": "^17.0.0"
  },

This was set to * in this commit so maybe @Rugvip has some context here. 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create an App - Backstage Demo
Run the app​​ The yarn dev command will run both the frontend and backend as separate processes (named [0] and [1] ) in...
Read more >
Error running a 'npx tsc' command regarding Typescript
The problem is that npx doesn't know where to find the right tsc command. It first looks for a package named tsc ....
Read more >
How to deploy Backstage on KIND Kubernetes - Roadie.io
In this tutorial, we're going to build a basic Backstage application and deploy it to a local Kubernetes cluster created with Kind.
Read more >
tsc command not found TypeScript error [Solved] | bobbyhadz
To solve the error 'tsc: command not found', install the typescript package globally by running `npm install typescript@latest -g` or use the `npx`...
Read more >
tsc-alias - npm
Replace alias paths with relative paths after typescript compilation.. Latest version: 1.8.2, last published: 18 days ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found