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

CompileErrorTrace.js Uncaught TypeError: Cannot read properties of undefined (reading 'replace') #571

Closed
nikhilnayyar002 opened this issue Jan 28, 2022 · 1 comment · Fixed by #577

Comments

@nikhilnayyar002
Copy link

nikhilnayyar002 commented Jan 28, 2022

using ForkTsCheckerWebpackPlugin:

      new ForkTsCheckerWebpackPlugin({
        typescript: {
          diagnosticOptions: {
            semantic: true,
            syntactic: true,
          },
          mode: "write-references",
        },
        logger: {
          issues: "webpack-infrastructure",
        },
        formatter: "basic",
      }),

When using formatter as "basic" & introducing type error as follows:

// "state" variable is set to undefined manually by commenting its decaration
function App() {
  // const [state] = useState(unixEpochInMs);
  console.log(1);
  return (
    <div>
      <div>Hello WORLD</div>
      <div>{state}</div>
    </div>
  );
}

There is a serious error in console:
image

reproducible:
repo: https://github.com/nikhilnayyar002/react-min.git
branch: compiler-bug

@nikhilnayyar002
Copy link
Author

location: overlay\components\CompileErrorTrace.js
line 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant