react-player: fix: breaking update v2.11.1
Current Behavior
Project doesn’t compile.
Expected Behavior
To compile correctly.
Steps to Reproduce
- Compile with version
2.11.1
- Boom
Other Information
Trace:
./node_modules/react-player/es6/ReactPlayer.jsx
--
19:45:31.464 | Module parse failed: Unexpected token (140:8)
19:45:31.464 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:45:31.464 | \| const { light, playIcon, previewTabIndex, oEmbedUrl } = this.props
19:45:31.464 | \| return (
19:45:31.464 | > <Preview
19:45:31.464 | \| url={url}
19:45:31.464 | \| light={light}
19:45:31.464 |
19:45:31.464 | Import trace for requested module:
19:45:31.464 | ./node_modules/react-player/es6/ReactPlayer.jsx
19:45:31.464 | ./node_modules/react-player/es6/index.js
19:45:31.464 | ./components/chats/FloatingVideoPlayer.tsx
19:45:31.465 | ./components/chats/DisplayFloatingVideoPlayer.tsx
19:45:31.465 |
19:45:31.465 | ./node_modules/react-player/es6/players/DailyMotion.jsx
19:45:31.465 | Module parse failed: Unexpected token (116:6)
19:45:31.465 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:45:31.465 | \| }
19:45:31.465 | \| return (
19:45:31.465 | > <div style={style}>
19:45:31.465 | \| <div ref={this.ref} />
19:45:31.465 | \| </div>
19:45:31.465 |
19:45:31.466 | Import trace for requested module:
19:45:31.466 | ./node_modules/react-player/es6/players/DailyMotion.jsx
19:45:31.466 | ./node_modules/react-player/es6/players/index.js
19:45:31.466 | ./node_modules/react-player/es6/index.js
19:45:31.466 | ./components/chats/FloatingVideoPlayer.tsx
19:45:31.466 | ./components/chats/DisplayFloatingVideoPlayer.tsx
19:45:31.466 |
19:45:31.466 | ./node_modules/react-player/es6/players/Facebook.jsx
19:45:31.466 | Module parse failed: Unexpected token (109:6)
19:45:31.466 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:45:31.467 | \| }
19:45:31.467 | \| return (
19:45:31.467 | > <div
19:45:31.467 | \| style={style}
19:45:31.467 | \| id={this.playerID}
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 24
- Comments: 27 (1 by maintainers)
I know this isn’t ideal but I just rolled it back in
package.json
from^2.11.0
to2.11.0
and it works@ralcant that’s what I did as well to get it working
same here, found a workaround using resolutions in yarn. This may help if some other library of yours is using this library, in other words this is the dependency of a dependency. https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/