react-twitter-embed icon indicating copy to clipboard operation
react-twitter-embed copied to clipboard

Web pack is throwing an error when trying to build bundle js

Open SamMalcolm opened this issue 5 years ago • 8 comments

Getting a few errors thrown by web pack which look like this

ERROR in ./node_modules/react-twitter-embed/dist/index.es.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/esm/possibleConstructorReturn'

Not sure what the issue is

SamMalcolm avatar May 13 '19 04:05 SamMalcolm

I am having same issue.

forward88 avatar May 14 '19 16:05 forward88

Same here: ERROR in ./node_modules/react-twitter-embed/dist/index.es.js Module not found: Error: Can't resolve '@babel/runtime/helpers/esm/classCallCheck' in '....../node_modules/react-twitter-embed/dist' @ ./node_modules/react-twitter-embed/dist/index.es.js 1:0-72 20:4-19 244:4-19 304:4-19 364:4-19 424:4-19 484:4-19 560:4-19 620:4-19 680:4-19 735:4-19

cymig avatar Jun 13 '19 17:06 cymig

Same issue here Using Webpack 3.8.1

Module not found: Can't resolve '@babel/runtime/helpers/esm/classCallCheck' in '/Users/<my-project>/node_modules/react-twitter-embed/dist'

saurishkar avatar Jul 10 '19 14:07 saurishkar

I'm having the same issue, and I think the problem is caused somehow by the building of the package in the dist folder.

Looks like that it references to too an unexisting directory of the @babel/runtime package, which is /esm/. This directory seems not to exist for me and for you, I think.

So, the actual workaround, working for me, is to downgrade to [email protected], because it looks like it works and seeks for the correct directories.

npm uninstall react-twitter-embed && npm install --save [email protected]

I won't made a fork and a pull request just because I have no idea how this package is compiled/builded and I am not an expert about webpack or babel, but if someone could make a PR, that would be great.

DanielVip3 avatar Sep 24 '19 22:09 DanielVip3

This is weird. I am able to use it. Checking right now

saurabhnemade avatar Oct 29 '19 17:10 saurabhnemade

Not sure. Found it working : https://stackblitz.com/edit/react-474wei

saurabhnemade avatar Oct 29 '19 17:10 saurabhnemade

@DanielVip3 @saurishkar @SamMalcolm @forward88 @cymig Can anyone create a repository to reproduce the issue? I am unable to reproduce it as of now with 3.0.1.

saurabhnemade avatar Oct 29 '19 17:10 saurabhnemade

In this commit 43254026ff200b11d0445cb5e60f18078bf49f1e Babel were upgraded to Version 7, so version 2.0.4 was the last version that worked with babel 6. I had to upgrade to babel 7 as well to get it working again.

oliverbienert avatar Dec 05 '19 09:12 oliverbienert