TypeStrong / TypeStrong/ts-loader

bug in generate stacktrace?

Open
#1,558 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.5k
Forks
439
Avg merge
17h 17m
Merged PRs (30d)
2

Description

Expected Behaviour
Error: Rows must be children by Table
    at index.tsx:12:41
    at oke (rows.tsx:19:39)
    at Ei (react-dom.production.min.js:167:176)
    at Sc (react-dom.production.min.js:291:227)
    at bs (react-dom.production.min.js:280:412)
    at gs (react-dom.production.min.js:280:352)
    at vs (react-dom.production.min.js:280:222)
    at as (react-dom.production.min.js:271:127)
    at os (react-dom.production.min.js:268:467)
    at C (scheduler.production.min.js:13:236)
    at MessagePort.H (scheduler.production.min.js:14:164)
Actual Behaviour
Error: Rows must be children by Table

    at oke (http://localhost:8080/resources/bundle.js:2:2326337)
    at div
    at div
    at tp (http://localhost:8080/resources/bundle.js:2:521747)
    at wh (http://localhost:8080/resources/bundle.js:2:547444)
    at Hh (http://localhost:8080/resources/bundle.js:2:548101)
    at gd (http://localhost:8080/resources/bundle.js:2:470930)
    at Ph
    at Kze (http://localhost:8080/resources/bundle.js:2:2324064)
    at t (http://localhost:8080/resources/bundle.js:2:2339153)
Steps to Reproduce the Problem
  • set options in tsconfig.json
{
"compilerOptions": {
    "sourceMap": true,
    "jsx": "react-jsx"
  }
}
  • set options in webpack.config.js
module.exports = (env, argv) => {
    return ({
        devtool: 'nosources-source-map',
    });
};
  • create component and throw error in it
  • put component in ErrorBoundary(use componentDidCatch) and render stacktrace
Location of a Minimal Repository that Demonstrates the Issue.

i made it if needed

if set devtool to eval-* then all prints ok. why only eval made right stacktrace? i wanted use hidden-source-map but it's not give me needed result.

P.S. error printed in console have expected paths in stack but in react(componentDidCatch) no

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the options in tsconfig.json and webpack.config.js, reproducing the issue through a React componentDidCatch handler. Compare the stack traces produced with eval-* against nosources-source-map and hidden-source-map, and check the reporter's minimal repository if provided. Done means the React-rendered stack trace retains the expected source paths while the requested source-map setting remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, webpack
Domain
build-system, frontend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.