Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset not found #24700

Closed
akrasyuk opened this issue May 3, 2019 · 2 comments
Closed

Asset not found #24700

akrasyuk opened this issue May 3, 2019 · 2 comments
Labels
Bug Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@akrasyuk
Copy link

akrasyuk commented May 3, 2019

🐛 Bug Report

Image not seen when we have spaces in file name.
Detailed error:

Error: Asset not found: C:\projects\AwesomeProject\Images\img%20test.png for platform: 
android
   at C:\projects\AwesomeProject\node_modules\metro\src\Assets.js:147:13
   at Generator.next (<anonymous>)
   at step (C:\projects\AwesomeProject\node_modules\metro\src\Assets.js:326:347)
   at C:\projects\AwesomeProject\node_modules\metro\src\Assets.js:326:507

To Reproduce

Just render Image component with source for an image with spaces in name.

Expected Behavior

Image should be rendered without errors.

Code Example

link to github example

Environment

React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Memory: 4.18 GB / 23.88 GB
Binaries:
Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

@kelset
Copy link
Contributor

kelset commented May 3, 2019

👋there
This seems to be an issue with Metro, which has a dedicated repo: https://github.com/facebook/metro/ so can you please open an issue there?

That said - in general, if possible, I'd suggest you to not have spaces (and other special simbols) in file names when it comes to development in general. That can lead to weird behaviours in the most incredible ways (of which, this is just one).

@kelset kelset closed this as completed May 3, 2019
@kelset kelset added the Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. label May 3, 2019
@Benzer1406
Copy link

Putting out the space of the file name fixed the issue for me. Thanks

@facebook facebook locked as resolved and limited conversation to collaborators May 3, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

4 participants