cannot build/run because of missing assets file
arpu opened this issue · comments
arpu commented
Hi,
looks like the assets dir is empty?
ERROR in ./src/characters/Enemy.js
Module not found: Error: Can't resolve '@/assets/characters/enemy.glb' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/characters'
@ ./src/characters/Enemy.js 12:0-51 35:81-87 45:81-87
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
ERROR in ./src/characters/Enemy.js
Module not found: Error: Can't resolve '@/assets/characters/enemy.json' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/characters'
@ ./src/characters/Enemy.js 11:0-52 35:89-95 45:89-95
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
ERROR in ./src/characters/Player.js
Module not found: Error: Can't resolve '@/assets/characters/player.glb' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/characters'
@ ./src/characters/Player.js 8:0-52 29:80-86
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
ERROR in ./src/characters/Player.js
Module not found: Error: Can't resolve '@/assets/characters/player.json' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/characters'
@ ./src/characters/Player.js 7:0-53 29:88-94
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
ERROR in ./src/weapons/Pistol.js
Module not found: Error: Can't resolve '@/assets/weapons/1911.glb' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/weapons'
@ ./src/weapons/Pistol.js 6:0-47 24:80-86
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
ERROR in ./src/weapons/Pistol.js
Module not found: Error: Can't resolve '@/assets/weapons/1911.mp3' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/weapons'
@ ./src/weapons/Pistol.js 7:0-46 37:34-39
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
ERROR in ./src/weapons/AK47.js
Module not found: Error: Can't resolve '@/assets/weapons/AK47.glb' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/weapons'
@ ./src/weapons/AK47.js 6:0-46 24:78-83
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
ERROR in ./src/weapons/AK47.js
Module not found: Error: Can't resolve '@/assets/weapons/AK47.mp3' in '/home/arpu/Work/githubsources/another-dumb-zombie-game/src/weapons'
@ ./src/weapons/AK47.js 7:0-46 38:34-39
@ ./src/managers/Game.js
@ ./src/ui/Game.svelte
@ ./src/main.js
Ustym Ukhman commented
Hi! Yeah, I know. I wanted to avoid duplicating these assets that has to be present here to make builds work on github pages.
You can just copy those assets and put them in src/assets/characters/
& src/assets/weapons/
as required (AK47.mp3
is embedded). Please consider that this experiment is still under (active) development and a lot could be changed, including assets management. Thanks for your ⭐ and feedback. 😊