Skip to content
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

Fix missing build error file paths #12051

Closed
wants to merge 3 commits into from
Closed

Fix missing build error file paths #12051

wants to merge 3 commits into from

Conversation

WesCossick
Copy link

@WesCossick WesCossick commented Feb 11, 2022

Fixes #12043.

Due to this commit, the file path indicating where a TypeScript build error came from was lost. See this comment for a comparison of CRA v5 vs v4.

This is a very problematic bug, with an easy fix.

Before

Creating an optimized production build...
Failed to compile.

TS6133: 'React' is declared but its value is never read.
    1 | // Imports
  > 2 | import React from 'react';
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 | import { render } from '@testing-library/react';
    4 | import Settings from './';
    5 | import { MemoryRouter } from 'react-router-dom';

After

Creating an optimized production build...
Failed to compile.

Error in src/components/sections/settings/index.test.tsx:2:1
TS6133: 'React' is declared but its value is never read.
    1 | // Imports
  > 2 | import React from 'react';
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 | import { render } from '@testing-library/react';
    4 | import Settings from './';
    5 | import { MemoryRouter } from 'react-router-dom';

@WesCossick WesCossick changed the title Fix missing build error paths Fix missing build error file paths Feb 11, 2022
@WesCossick WesCossick closed this by deleting the head repository Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors emitted by react-scripts build don't include any trace after upgrading to 5.0.0
2 participants