reactjs / reactjs/react-docgen

AssertionError [ERR_ASSERTION]: did not recognize object of type "File"

Open
#497 5 comments 3 reactions 0 assignees View on GitHub

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

image

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

Source from production build
image

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.