-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Typescript: Simplified typescript steps not working #5541
Comments
I believe the issue is the fact that - while the PR was merged in - they have not yet published a new version of Last publish was 9 days ago: https://www.npmjs.com/package/react-scripts |
Ahh totally forgot to check that. I assumed it had already been done given all of the recent commits to master in |
Is known when the new version will be published? |
Not sure, but would be awesome if it was at least published to canary or a different tag. |
Not a bug, it's just that v2.1 wasn't published yet. It should be really soon! You can use the yarn link method for now.
|
@brunolemos I'm currently using react-scripts-ts which I think was also recommended in the CRA readme. Do you think it would be a good idea to add a migration guide for people coming from |
@nielsdB97 Not sure, because it's very simple. The user just needs to remove any mention of Anything different than this only makes sense to be on |
@brunolemos if that's all there is to it then I would agree it's not necessary to have a migration guide. However I figured there might be some differences in the configs, for example how I actually just tried replacing PS: Thanks a lot for your efforts, this is what was keeping me from using CRA 😄 |
@nielsdB97 It's because I didn't publish the other required packages, sorry. Please wait for the official release or use this method instead:
Older method using
|
@brunolemos is there an estimated time frame on when the new package will be available? |
@Paul-Colucci I don't have control over when it will be released, so I don't know. But if 2.1 will only contain typescript, it could be any time now. |
@brunolemos I just followed your instructions and linked my local Is this because it uses Babel and not the standard TS compiler? If so, do you think we can/want to support this functionality by default? |
Things that land in master might not get released for weeks or even months (in the worst case). When things get released, they appear in the changelog and on the releases page. 😉 |
@gaearon Can we put |
@gaearon yeah that's my bad, I jumped the gun a bit. I saw some tweets and discussion on |
However when I tried to import scss files, the following error appears:
The |
Please use this new method instead of
For existing projects, run Let me know if that works for you! @sebasmurphy you can close this :) |
Closing... |
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes
Environment
Environment:
OS: macOS 10.14
Node: 10.12.0
Yarn: 1.10.1
npm: 6.4.1
Packages: (wanted => installed)
react: ^16.5.2 => 16.5.2
react-dom: ^16.5.2 => 16.5.2
react-scripts: 2.0.5 => 2.0.5
Steps to Reproduce
I noticed that typescript was added to the project officially. I went ahead and created a new project and followed in the instructions detailed in 3c11efe but they did not work. I've walked back through the commit history and tried some of the previously detailed steps to no avail. Neither creating a tsconfig.json or a tsconfig.json with
{}
in the file worked for me either.Followed instructions listed at https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/adding-typescript.md
yarn add typescript @types/react @types/react-dom @types/jest
src/index.js to src/index.tsx
Expected Behavior
I expected the app to start correctly
Actual Behavior
Received an error .
Reproducible Demo
https://github.com/sebasmurphy/prototype-react-typescript
The text was updated successfully, but these errors were encountered: