bberak / react-native-game-engine-handbook

A React Native app showcasing some examples using react-native-game-engine 🐒✨

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error for `assets/images`

objectiveSee opened this issue · comments

Hey! Trying to run this demo project but I get an error about a missing path. This error happens on iOS when running in the Expo client.

Error:

Error: ENOENT: no such file or directory, scandir '/Users/danny/workspace/react-native-game-engine-handbook/assets/images'

I am not sure where in the code this error is coming from since all of the images seem to have proper paths pointing to table-of-contents/images. Any thoughts?

I tweaked some settings and created assets/images but then get this error:

Error: Asset not found: /Users/danny/workspace/react-native-game-engine-handbook/assets/images/icon.png for platform: null
    at /Users/danny/workspace/react-native-game-engine-handbook/node_modules/metro/src/Assets.js:188:13
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/danny/workspace/react-native-game-engine-handbook/node_modules/metro/src/Assets.js:52:24)
    at _next (/Users/danny/workspace/react-native-game-engine-handbook/node_modules/metro/src/Assets.js:72:9)

Hi @objectiveSee,

I've got another issue to updated the Expo SDK. I'll try get this fixed/working/diagnosed at the same time.

Thanks for the bug report.

Thanks will test!

Hi @objectiveSee,

I've just updated the app to work with the latest version of Expo. Hopefully this will fix your issue too. Upgrade steps:

cd react-native-game-engine-handbook
rm -rf node_modules
git pull
npm install -g expo-cli
npm install
npm run start
# You might also need to update the Expo client on your devices

If it helps, I'm running the following versions:

node -v: v12.13.0
npm -v: 6.12.0
expo --version: 3.21.13

Let me know how that goes, cheers!

you can fix that by copying the assets folder into /src/assets

I've just updated to Expo SDK 42 and can confirm that the app is running on Android and iOS. Please feel free to re-open this issue if necessary, cheers!