reactjs / reactjs/react-docgen
AssertionError [ERR_ASSERTION]: did not recognize object of type "File"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 316
- Avg merge
- 5h 7m
- Merged PRs (30d)
- 4
Description
I have multiple errors with same types when trying build docs with styleguidist

Production mode doesn't work, development mode work properly.
Use react 17 with new jsx transform.
Source from production build

Browser error
bundle.41681933.js:formatted:33543 Uncaught TypeError: Object(...) is not a function
Main app with same config (webpack+babel) work properly in dev and prod mode
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the production-mode documentation build with React 17, the new JSX transform, webpack, and Babel, then compare it with the working development build. Investigate the reported "File" assertion and browser TypeError; done means the production build completes and the generated documentation works without either error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, react, webpack
- Domain
- build-system, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100