decentraland / cli

💻 Decentraland command-line interface
https://docs.decentraland.org
Apache License 2.0
69 stars 61 forks source link

dcl pack creates items that error when placed into builder #565

Open cfravel opened 3 years ago

cfravel commented 3 years ago

I've tried "dcl pack" on items from the DCL libary of smart-items and simple items of my own. I have tried various versions of decentraland and decentraland-ecs. When I place the item.zip into a new asset pack in the Builder, it reports: "src/games.ts: Exported scenes are not allowed"

steps to reproduce: Pull the arrow smart item from the DCL github npm i dcl build dcl pack drag the reslting item.zip into the Builder // expected: it gets added // actual: error: src/games.ts: Exported scenes are not allowed

cfravel commented 3 years ago

Seems like the fix is to do a little cleanup on the item.zip file, most especially removing the src/game.ts file. However, dont' remove the /bin directory, or you won't get the properties panel when you select the object in the builder editor. Also, if you are using git, remove the .git directory. you don't neet the .gitignore or .dclignore files, either. You can rename the item.zip without harm.

cfravel commented 3 years ago

This is still not fixed in 3.5.1. at ;least not on Windows. At the least it shouldn't put src/gamet.ts (the test harness) into the item.zip file, because it makes it throw an error when adding it to an asset pack.

Other files that it tends to put into it that can/should be removed include

.git folder, if you are using git .gitignore I'm not sure, but probably package.json and .dclignore could be removed. I like it that it puts any README.md into the item.zip, though.