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

Build failed for recharts@2.8.0 #61

Open
remnantkevin opened this issue Oct 4, 2023 · 2 comments
Open

Build failed for recharts@2.8.0 #61

remnantkevin opened this issue Oct 4, 2023 · 2 comments

Comments

@remnantkevin
Copy link

Code editor contents

// Click Build for the Bundled, Minified & Compressed package size
export * from "recharts@2.8.0";
export { default } from "recharts@2.8.0";

URL

https://bundlejs.com/?q=recharts%402.8.0

Browser console errors

index.ts:134 ✘ [ERROR] Do not know how to load path: http-url:https://unpkg.com/dom-helpers@5.2.1/class/addClass

    http-url:https://unpkg.com/react-transition-group@2.9.0/CSSTransition:8:47:
      8 │ ...ss = _interopRequireDefault(require("dom-helpers/class/addClass"));
        ╵                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~


st @ index.ts:134
(anonymous) @ index.ts:267
error @ index.ts:266
(anonymous) @ api.es.js:1
forEach @ api.es.js:1
(anonymous) @ api.es.js:1
emit @ api.es.js:1
(anonymous) @ index.ts:91

✘ [ERROR] Do not know how to load path: http-url:https://unpkg.com/dom-helpers@5.2.1/class/removeClass

    http-url:https://unpkg.com/react-transition-group@2.9.0/CSSTransition:10:50:
      10 │ ... _interopRequireDefault(require("dom-helpers/class/removeClass"));
         ╵                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


st @ index.ts:134
(anonymous) @ index.ts:267
error @ index.ts:266
(anonymous) @ api.es.js:1
forEach @ api.es.js:1
(anonymous) @ api.es.js:1
emit @ api.es.js:1
(anonymous) @ index.ts:91

Browser details

Chome
Version 117.0.5938.132 (Official Build) (arm64)

Screenshot of errors on webpage

Click to see screenshot

bundlejs-error-recharts

@nickpresta
Copy link

nickpresta commented Mar 6, 2024

Seeing the same sort of thing with a different package (link):

// @protobuf-ts
import { RpcError, stackIntercept, ServiceType } from "@protobuf-ts/runtime-rpc";
import { isJsonObject, typeofJsonValue, PbLong, ScalarType, LongType, MessageType } from "@protobuf-ts/runtime";
import { TwirpFetchTransport } from "@protobuf-ts/twirp-transport";

console.log(RpcError, stackIntercept, ServiceType, isJsonObject, typeofJsonValue, PbLong, ScalarType, LongType, MessageType, TwirpFetchTransport);

I get:

✘ [ERROR] Do not know how to load path: http-url:https://unpkg.com/@protobuf-ts/twirp-transport@2.9.3


/input.ts:4:36:

      4 │ import { TwirpFetchTransport } from "@protobuf-ts/twirp-transport";
        ╵                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For what it's worth, switching CDNs might work around issues with specific package.

For example, swapping to skypack as the CDN using the skypack: protocol before the package name (e.g. import thing from 'skypack:package') still breaks with the same sort of error message, but switching to esm.run:package works fine for the example above

@okikio
Copy link
Owner

okikio commented Mar 6, 2024

I was able to get the RPC bundle working

SmartSelect_20240306-134926_Kiwi Browser.jpg

But yeah there is actually a problem with the original bundle it's using the wrong version of the package

Screenshot_20240306-140718_Kiwi Browser.jpg

SmartSelect_20240306-140826_Kiwi Browser.jpg

SmartSelect_20240306-140844_Kiwi Browser.jpg

SmartSelect_20240306-141237_Kiwi Browser.jpg

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