'Getting a filename from react-scripts build?
I am using yarn to run react-scripts build on a private Typescript repository. The build fails with the following message:
yarn build -v
yarn run v1.22.17
$ react-scripts build -v
Creating an optimized production build...
Failed to compile.
TS2322: Type 'string | undefined' is not assignable to type 'string | number | boolean'.
Type 'undefined' is not assignable to type 'string | number | boolean'.
114 | withCredentials: true,
115 | headers: {
> 116 | Authorization: token ? `Bearer ${token}` : undefined,
| ^^^^^^^^^^^^^
117 | },
118 | });
119 |
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I understand the error, but I cannot find what file the error is in because react-scripts build doesn't seem to output the file name? I'm not sure if this is a problem with my local configuration but is there a way to get react-scripts to tell me where exactly this error is?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
