React-popper: "ReferenceError: babelHelpers is not defined" in version 0.10.2 (not in 0.10.1)

Created on 1 May 2018  路  12Comments  路  Source: popperjs/react-popper

Reproduction demo

Steps to reproduce the problem

  1. I'm using material-ui beta 44 which uses react-popper as a dependency (bundled with create-react-app typescript scripts)

What is the expected behavior?

It should compile.

What went wrong?

I get the following error:

ReferenceError: babelHelpers is not defined
(anonymous function)
node_modules/react-popper/lib/Manager.js:5
  2 | import PropTypes from 'prop-types';
  3 | 
  4 | var Manager = function (_Component) {
> 5 |   babelHelpers.inherits(Manager, _Component);
  6 | 
  7 |   function Manager() {
  8 |     var _ref;

Any other comments?

Installing 0.10.1 manually fixes the problem. I can provide more info if necessary although given that the new version was only just released, I was hoping it would be an obvious fix.

Packages versions

  • Popper.js:
  • react-popper: 0.10.2
bug

Most helpful comment

0.10.4 should be fine hopefully

All 12 comments

@virgofx since you worked on the 0.10.2 changes, may you have a look?

@FezVrasta external-helpers should be added only for rollup build. For babeled files it shouldn't not be added.

Investigating

0.10.3 fixes it

@TrySound @davidxmoody Can you check 0.10.3 and confirm fixed?

The babelhelpers are not referenced in the file anymore so hopefully yes.

https://unpkg.com/[email protected]/lib/Manager.js

But I just noticed that the package.json points to an invalid main path, is it still related to your PR maybe?

I actually didn't change the package.json file (not too familiar with the main or umd:main references). ... but the locations should be updated. I'm sure I could submit a new PR to update those. It seems like they should be updated (good catch).

Should the main point to the lib/react-popper.js or the CJS file? and umd:main to the new dist/umd/react-popper.min.js file?

also consider jsdelivr and unpkg properties in the package.json (and maybe even cdn). They are properties which help the CDNs determine which file to server.
See:
https://github.com/unpkg/unpkg/issues/63
https://github.com/jsdelivr/jsdelivr#publishing-packages

0.10.3 introduces another problem. package.json references dist/react-popper.js but this file doesn't exist.

0.10.4 should be fine hopefully

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Argonanth picture Argonanth  路  4Comments

mogusbi picture mogusbi  路  5Comments

nstepien picture nstepien  路  5Comments

souporserious picture souporserious  路  5Comments

rolandjitsu picture rolandjitsu  路  5Comments