pcui icon indicating copy to clipboard operation
pcui copied to clipboard

PCUI source fails to build from NPM build sites

Open rpaladin opened this issue 3 years ago • 2 comments

Comments

When I attempt to use a CDN package build site I get package errors about PCUI failing to build. @yaustar was able to confirm that PCUI can still be built without errors if done locally.

I hope I do not offend anyone by sharing this but PCUI at SkyPack does have a relatively low package setup rating:

Build Errors from CodePen

CodePen Reproducible Errors Project

https://codepen.io/RandomPanda/pen/ExwrPqB

Possible Solutions

The exports argument is missing in the PCUI package.json.

Package Build Sites (using CDN from SkyPack)

Hosting provider: https://codepen.io Package build sites: https://skypack.dev & https://www.jsdelivr.com

Forum Thread

https://forum.playcanvas.com/t/pcui-framework-build-source-failing/23793/1

Final Comments

It would be great if this issue was resolved because some people who choose to use the PlayCanvas Engine-Only CDN approach will also like to use PCUI perhaps. Not to mention that the PlayCanvas Editor only allows its own PCUI.js in the editor and not at runtime.

rpaladin avatar Jan 25 '22 02:01 rpaladin

Not to mention that the PlayCanvas Editor only allows its own PCUI.js in the editor and not at runtime.

Not sure what you mean by this? You can use PCUI.js at runtime as seen here: https://playcanvas.com/project/808700/overview/pcui-game-inspector

yaustar avatar Jan 25 '22 09:01 yaustar

Sorry, I was referring to the Editor PCUI folder in general that is filled with compiled JS files. Should have clarified that.

rpaladin avatar Jan 25 '22 19:01 rpaladin

I believe this is now fixed with PCUI 3.1.1. See:

https://codepen.io/playcanvas/pen/LYBxwOx

willeastcott avatar Jan 09 '23 15:01 willeastcott

Also, I've migrated the PCUI examples to use SkyPack now and it works perfectly:

https://github.com/playcanvas/pcui/pull/262/files

As for the low SkyPack score, it was complaining that the package.json was missing the keywords property, so I've added it here:

https://github.com/playcanvas/pcui/pull/263

willeastcott avatar Jan 09 '23 20:01 willeastcott