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.

Create react app using typescript fails

See original GitHub issue

Bug report

Describe the bug

following the tutorial i used the create react app. command, the resulting app has typescript errors

To reproduce

  1. yarn create react-app my-app --template @chakra-ui/typescript
  2. yarn run start

Expected behavior

Screenshots

Screen Shot 2020-10-23 at 12 21 03 PM

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies): [e.g. Chrome, Safari]
  • Version of @chakra-ui/core: [e.g. 1.0.0-rc.3]
  • Version of Node.js: [e.g. 12.11.1] mac os

node --version v12.18.3

Additional context

should be an easy on boarding experience for new users

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ljosberinncommented, Oct 23, 2020

Nevermind, its because of the old template. create-react-app is limiting in which git source we pull iirc, so the template you have there right now is from back then, -next.6.

You’re probably seeing this error: image

simply change Grid instead to <Grid minH="100vh" p={3}>, removing the other props. It’s already fixed in the repo here for a while…

There’s currently an issue with the color mode in create-react-app or rather generally client side rendering which will be fixed in the upcoming rc.6 which will be released later today.

0reactions
ljosberinncommented, Oct 23, 2020

seeing now that create-react-app just released v4 so I’m checking locally real quick, that might’ve changed something

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is create-react-app giving typescript error when trying to ...
2 Answers 2 · Change the script in package.json to only lint the source directory: "lint": "eslint src/" · Create a .eslintignore (or...
Read more >
Cannot compile TypeScript app created with CRA ... - GitHub
Describe the bug create-react-app seems to have issues compiling valid TypeScript code. Did you try recovering your dependencies? Yes, in a ...
Read more >
Create React App and TypeScript: A Quick How-To | Built In
Let's take a look at creating a new React app that uses TypeScript from the jump, and convert an existing project from JavaScript...
Read more >
Error when updating create-react-app to 4.0 with typescript ...
[Solved]-Error when updating create-react-app to 4.0 with typescript template-Reactjs ... Then I reinstalled with the command yarn . Last, yarn start . This...
Read more >
How to Use Create React App With TypeScript
The Create React App will be launched using the TypeScript template as shown in the image below. On the left sidebar, we have...
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