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
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
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:
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 usingownPackageJson.name
, it's hardcoded inverifyTypeScriptSetup.js
Perhaps this should be modified to check the package.json for a name?
The text was updated successfully, but these errors were encountered: