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

[repo] umd build is broken, stackblitz fails to load #1707

Closed
1 of 2 tasks
jonguenther opened this issue Oct 20, 2020 · 5 comments · Fixed by #1726
Closed
1 of 2 tasks

[repo] umd build is broken, stackblitz fails to load #1707

jonguenther opened this issue Oct 20, 2020 · 5 comments · Fixed by #1726

Comments

@jonguenther
Copy link
Collaborator

jonguenther commented Oct 20, 2020

What package is this for?

  • React
  • Angular

Describe the bug

The codesandbox linked in the issue template cannot load thecarbon-addons-iot-react. This also affects Stackblitz.

To Reproduce

Steps to reproduce the behavior:

  1. Open Codesandbox or Stackblitz
  2. Codesandbox won't progress loading while Stackblitz will show show an error after installing the packages.

Expected behavior

Both editors should be able to load the carbon-addons-iot-react package.

Environment/versions:

  • Browser: Chrome & Safari
  • carbon-addons-iot-react version: >= 2.115.3

Additional context

Stackblitz can actually load carbon-addons-iot-react up to version 2.115.2 (example Stackblitz) whereas Codesandbox seems to not be able to load any recent versions.

@tay1orjones tay1orjones changed the title [Issue Template] Codesandbox broken [repo] umd build is broken, stackblitz fails to load Oct 21, 2020
@tay1orjones
Copy link
Member

tay1orjones commented Oct 21, 2020

Thanks for reporting this! We're aware of the issue with Codesandbox (#1370). Unfortunately it's something they need to fix on their end.

The Stackblitz error is from our umd build beginning with v2.115.3 where in the diff you can see the rollup config was altered as part of #1590. I'm concerned the umd build may be broken in other environments besides Stackblitz, though I haven't confirmed yet.

@scottdickerson What was the reason for the build change? Looks like this has broken the build before, #677. rollup-plugin-node-builtins has never been used despite it being added as a dependency https://github.com/carbon-design-system/carbon-addons-iot-react/pull/677/files#diff-6814bf77564b4f1c92f5861e184e28fe217c080a047fefa8b73a728f755ec45cR9-R10.

The package overall is a bit of a mess - it isn't maintained, has conflicting licenses declared in package.json and the readme.md, author is unresponsive to calls for updates or deprecation. Unfortunately the rollup team doesn't really have a good solution.

@tay1orjones
Copy link
Member

tay1orjones commented Oct 21, 2020

Woops, didn't mean to close. I'm going to mark this as a sev1 until we can confirm the umd build works in a CRA

@tay1orjones tay1orjones reopened this Oct 21, 2020
@tay1orjones tay1orjones added the severity: 1 🚨 Affects major functionality, no workaround label Oct 21, 2020
@tay1orjones
Copy link
Member

tay1orjones commented Oct 21, 2020

I've confirmed the UMD build is broken when spinning up a npx create-iot-react-app <app-name> and modifying the the import to force the umd version in App.js

 import {
   HeaderContainer,
   Header,
   SideNav,
   Button,
   PageTitleBar,
- } from "carbon-addons-iot-react";
+ } from "carbon-addons-iot-react/umd/carbon-addons-iot-react";
TypeError: Cannot read property 'EVENTS' of undefined

Screen Shot 2020-10-21 at 11 37 25 AM

@tay1orjones
Copy link
Member

🎉 This issue has been resolved in version 2.140.0-next.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tay1orjones
Copy link
Member

🎉 This issue has been resolved in version 2.140.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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