-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
"react-scripts" Required For TypeScript, Even When Using "--scripts-version" #5811
Comments
This is completely controlled by your fork and should be updated accordingly. |
I'd take a PR making this smarter via reading from |
@Timer thanks for pointing me in the right direction. As for the PR, I'd love to do it, because it would be super-cool to get a PR accepted into create-react-app. I spent a little time looking at, and it seems the only way to get the scripts name from I think to get it right, it would be better to pass the |
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
I didn't see anything that looked relevant.
Environment
Uh.. I get an exception running that command. But create-react-app itself works fine, creating an app. This exception doesn't seem to be the culprit. I'm happy to try other commands. I'm assuming this exception is a known problem.
`
Environment Info:
(node:3520) UnhandledPromiseRejectionWarning: Error: The system cannot find the path specified.
(node:3520) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3520) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
`
Steps to Reproduce
Use create-react-app to create a new app, use the --scripts-version arg and the --typescript arg.
My own scripts fork is WordPress specific, so you might not be setup to use it. I believe the problem will appear with any --scripts-version arg. But here are my specific steps:
create-react-wptheme
my react-scripts fork (branch)
Expected Behavior
Step #6 above should show a successful TypeScript compile.
Actual Behavior
There's a file called "react-app-env.d.ts" inside the src folder when using the --typescript command arg. In there is a single line:
/// <reference types="react-scripts" />
So looks like maybe two possible solutions to the problem:
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered: