You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot find type definition file for 'react-scripts' in custom react-scripts #5875
Noticed what might be a small footgun for people forking react-scripts to create their own.
I was almost done setting up my custom react-scripts fork when I got this error:
/home/dano/src/ctrlpanel-ts/src/react-app-env.d.ts
Type error: Cannot find type definition file for 'react-scripts'. TS2688
> 1 | /// <reference types="react-scripts" />
| ^
2 |
The problem was fixed in my project by changing the types string in react-app-env.d.ts to match the name of my react-sripts package. (e.g. "react-scripts" -> "@company/react-scripts")
After some sleuthing, I found out that, although custom script names are handled in config/paths.js by using ownPackageJson.name, it's hardcoded in verifyTypeScriptSetup.js
Activity
Timer commentedon Nov 22, 2018
PR at #5827
Thanks!