JedWatson / JedWatson/react-select

Module parse failed: Unexpected token

Open
#5,380 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting-author-response issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Recently got this bug randomly when trying to deploy to production. Says the error is involving react-select.

ERROR in ./node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js
Module parse failed: Unexpected token (306:11)
You may need an appropriate loader to handle this file type.
|   }
| 
|   return { ...rect,
|     x: rect.x - scroll.scrollLeft + offsets.x,
|     y: rect.y - scroll.scrollTop + offsets.y
 @ ./node_modules/react-select/dist/react-select.esm.js 23:0-26
 @ ./app/javascript/components/Chatrooms/ActiveProjects.js
 @ ./app/javascript/components ^\.\/.*$
 @ ./app/javascript/packs/server_rendering.js

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 import chain in app/javascript/components/Chatrooms/ActiveProjects.js and app/javascript/packs/server_rendering.js, then reproduce the production deployment and inspect the parse failure at node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js:306. Done means identifying the relevant build configuration or dependency compatibility issue and confirming the production build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.