bundlejs icon indicating copy to clipboard operation
bundlejs copied to clipboard

Build failed for `[email protected]`

Open remnantkevin opened this issue 2 years ago • 2 comments

Code editor contents

// Click Build for the Bundled, Minified & Compressed package size
export * from "[email protected]";
export { default } from "[email protected]";

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/[email protected]/class/addClass

    http-url:https://unpkg.com/[email protected]/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/[email protected]/class/removeClass

    http-url:https://unpkg.com/[email protected]/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

remnantkevin avatar Oct 04 '23 03:10 remnantkevin

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/[email protected]


/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

nickpresta avatar Mar 06 '24 15:03 nickpresta

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

okikio avatar Mar 06 '24 19:03 okikio

This issue is now fixed 💯

okikio avatar Jun 28 '24 08:06 okikio