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.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
babel, react, webpack

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.

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

Dominant language
TypeScript
Stars
3.8k
Forks
316
Avg merge
3h 28m
Merged PRs (30d)
6

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.

More from reactjs/react-docgen

All issues in reactjs/react-docgen

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.