Should not auto generate `tsconfig.json` for `js` project unexpectly.
See original GitHub issueIs this a bug report?
No
Environment
npx: installed 1 in 12.203s
Path must be a string. Received undefined
C:\Users\zheng\AppData\Roaming\npm\node_modules\create-react-app\index.js
Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Binaries:
Yarn: 1.13.0 - C:\Users\zheng\AppData\Roaming\npm\yarn.CMD
npm: 6.8.0 - D:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 40.15063.674.0
Internet Explorer: 11.0.15063.850
npmPackages:
react: ^16.8.3 => 16.8.3
react-dom: ^16.8.3 => 16.8.3
react-scripts: 2.1.5 => 2.1.5
npmGlobalPackages:
create-react-app: Not Found
Steps to Reproduce
- create a javascript project, and some source code like
xxx.js
. - create a type declared file for it, like
xxx.d.ts
.
Now each time we start the project used react-scripts start
, it would generate a tsconfig.json
unexpectly.
Expected Behavior
We just want to used the d.ts
to declared some complicated types for some code, which flow
and jsdoc
could not implements.
I tried removed the d.ts
temporary and start the project, then I recovery the d.ts
file, and everything works well. The whole problem is just that react-scripts start
generate the tsconfig.json
and throw It looks like you're trying to use TypeScript but do not have typescript installed.
unexpectly, for I just want used typed declartion instead of used Typescript
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How can I generate a tsconfig.json file? - Stack Overflow
json via the command line? I tried command tsc init , but this doesn't work. typescript.
Read more >TSConfig Reference - Docs on every TSConfig option
json ' extension, which is a common practice in node projects. This includes generating a type for the import based on the static...
Read more >Typescript does not resolve modules through tsconfig.json's ...
Typescript does not resolve modules through tsconfig.json's baseUrl ... Whenever I create a component and try to import a service like this:
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
Note that ESLint does not support ESM configuration at this time. ... ESLint's JSON files also allow JavaScript-style comments. package.json - create an ......
Read more >Troubleshooting | Stryker Mutator
The root cause for this is that Jest doesn't support running in a hidden directory on windows, like StrykerJS does by default (the...
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
For the time being we are going to exclude
*.d.ts
from this check. We might reconsider autogeneratingtsconfig.json
in the future.It looks like this was fixed so I’m going to close this issue: https://github.com/facebook/create-react-app/commit/df3e73f454f718dbb3f928ecf681a50467e5a18d#diff-9bb845f98191a45e63dd93f69abfb0e8