Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm registry version differs from github release #690

Open
NeroVanbiervliet opened this issue May 8, 2020 · 11 comments
Open

Npm registry version differs from github release #690

NeroVanbiervliet opened this issue May 8, 2020 · 11 comments

Comments

@NeroVanbiervliet
Copy link

NeroVanbiervliet commented May 8, 2020

Overview of the problem

I'm using react-rnd version [10.1.9] (see npm)

My browser is: Chrome (electron)

Steps to Reproduce

  1. yarn add react-rnd
  2. Version in package.json will be 10.1.9

Expected behavior

Version to be consistent with github releases (10.1.8 or 9.1.1)

@NeroVanbiervliet
Copy link
Author

As a side node, version 10.1.9 made our application crash upon building.

@bokuweb
Copy link
Owner

bokuweb commented May 8, 2020

As a side node, version 10.1.9 made our application crash upon building.

@NeroVanbiervliet Thanks for your report :) Could you please provide reproduced project in codesandbox? It seems that 10.1.9 works following sample.

https://codesandbox.io/s/y3997qply9

@NeroVanbiervliet
Copy link
Author

I cannot reproduce it in codesandbox. In our project, it works fine in development using webpack-dev-server. But as soon as I bundle our code for production, it crashes. We get the following error

super expression must either be null or a function, not undefined react build

Switching to 10.1.8 solved the issue.
I can provide you with more info concerning our environment/project setup if you wish!

@bokuweb
Copy link
Owner

bokuweb commented May 8, 2020

@NeroVanbiervliet I guess react-draggable cause this error. react-grid-layout/react-draggable#476

I'll downgrade react-draggable for now.

bokuweb added a commit that referenced this issue May 8, 2020
bokuweb added a commit that referenced this issue May 8, 2020
@bokuweb
Copy link
Owner

bokuweb commented May 8, 2020

Downgrade react-draggable for now

@bokuweb bokuweb closed this as completed May 8, 2020
@bokuweb
Copy link
Owner

bokuweb commented May 8, 2020

https://github.com/bokuweb/react-rnd/releases/tag/v10.1.10

@NeroVanbiervliet
Copy link
Author

Confirmed fixed :) Thanks a lot!

@STRML
Copy link

STRML commented May 11, 2020

Hi - if any of you can recreate this error in React-Draggable 4.3.1 we'd be very happy to find out how you did it. There is no appreciable difference we can find in the bundling between 4.2.0 and 4.3.1, but many users are reporting this with no reproduction.

If someone could post a reproduction, we can get it fixed quickly.

@bokuweb bokuweb reopened this May 11, 2020
@bokuweb
Copy link
Owner

bokuweb commented May 11, 2020

@NeroVanbiervliet @MBaert Do you have any information about this?

@NeroVanbiervliet
Copy link
Author

NeroVanbiervliet commented May 12, 2020

I created a fork of an electron boilerplate to demonstrate the issue here. In my only commit I added react-rnd @ 10.1.9 and imported it in the index.

Reproduction steps

  1. yarn install
  2. yarn package
  3. run executable in builds/
  4. check dev console to see the error "Uncaught TypeError: Super expression must either be null or a function"

As stated above the error only occurs after bundling, not in dev mode.

@STRML
Copy link

STRML commented May 12, 2020

Thank you very much @NeroVanbiervliet. Because of your reproduction I was able to verify that react-draggable@4.4.0 fixes the original issue, and discovered another bundling issue that is fixed in 4.4.1.

@bokuweb thanks for your patience with me, I had a hare-brained idea to modernize the builds I was shipping to support umd, cjs, and modules - an exercise in futility to handle well, with the costs far outweighing the benefits. Most of that work is deleted in 4.4.1, and the only exposed build is ES5-compliant, unminified, CJS source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants