-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
mp3 file error #6527
Comments
This is strange. Are you trying to include the file in your project at all? |
I drop the file into my Xcode project and check both 'Copy item into it' and set target to my app. The same happens if I put the file outside the iOS folder. It seems to happen to any file with audio extension; I've tried wav, mp3, mp4. They all throw the same error. I fixed the issue by removing the file extension. So I just use 'abc' instead of 'abc.mp3'. Interestingly, I created a new RN project and this doesn't happen. My project was created with RN 0.19.0 and I recently upgraded to 0.21.0. The only thing I can think of is that something didn't go right during the upgrade, since new projects created with 0.21.0 doesn't seem to have the same problem. |
Perhaps you had an older version of the packager running? Since this is not a problem with a standard install of 0.21, let's close this and see if it pops up again. |
@jsierles The problem was with not running |
I upgraded to 0.22 and I get TypeError: unsupported file type on node_modules/clone/test.html What's that about? |
@arianitu check if html is in .flowconfig file's module.name_mapper |
I was still using the old image API, like this:
This use to pull from Images.xcassets, but now it seems to pull from the project directory and found the test.html file inside of node_modules/clone/test.html I think the fix is to move all assets out from xcassets and put them in my project and require them that way. What a really confusing error, it was really hard to track down since it had no indication that this had anything to do with the image api. |
After converting to the new image API, I no longer get TypeError: unsupported file type and my project works. |
I got the same error when I use the 0.27.2. |
I have solved this problem by use new image api {uri: 'app_icon'} |
I had the same problem and curiously I have only to use {{uri:'image.png'}} for images that have nested contents, then it worked. |
Adding an mp3 file into the project directory, running
npm start
, and reloading the application results in this error:It seems like RN thinks the mp3 file is an image file, but because it is an unknown image type, image-size is throwing an error. The file has the .mp3 extension. How do I fix this issue?
The text was updated successfully, but these errors were encountered: