bundlephobia icon indicating copy to clipboard operation
bundlephobia copied to clipboard

Build Error: three fails to build

Open mrdoob opened this issue 4 years ago • 1 comments

Package name

https://bundlephobia.com/package/three

Entire (stringified) error that I see in my browser console

"Failed to build this package."

Screen Shot 2021-08-27 at 12 50 46 PM

I suspect it is because we tried using private class fields.

More info: https://github.com/mrdoob/three.js/issues/22437

mrdoob avatar Aug 27 '21 10:08 mrdoob

I suspect it is because we tried using private class fields.

Highly likely. The gist of it is that bundlephobia compiles your code with Webpack 4 which is using an older version of acorn that cannot parse the newer JavaScript syntaxes (nullish coalescing, optional chaining, top-level await and export ns from...).

In this case, bundlephobia tools will need an upgrade. See: https://github.com/pastelsky/bundlephobia/issues/413#issuecomment-829240176

dmnsgn avatar Aug 27 '21 12:08 dmnsgn

This issue can be closed, it was fixed as mentioned here

marcofugaro avatar Dec 20 '22 14:12 marcofugaro