Uncaught TypeError in ref.js:6:32

Open
#647 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, react, vite

Research direction

Start by reproducing the Vite build with the listed React 18.3.1, react-dom 18.3.1, react-router-dom 6.30.1, and antd 5.26.0 versions, then inspect ref.js at line 6 where version is read. Done means the built application no longer throws the TypeError.

Written by the indexing model from the issue text.

Description

My application:
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.30.1",
"antd": "^5.26.0",

throws error after build. I am using Vite v6.3.5.
Uncaught TypeError: Cannot read properties of undefined (reading 'version')
at ref.js:6:32
var ReactMajorVersion = Number(version.split('.')[0]);

Dominant language
TypeScript
Stars
670
Forks
205
Avg merge
15d 17h
Merged PRs (30d)
6

Contributor guide

No contributing guide indexed for this repository

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 react-component/util

All issues in react-component/util

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.