'The development server returns response error code: 500 - react-native-lyric
For one of my React Native projects, I'm using react-native-lrc. This is a package that can be used to play .lrc files (audio lyrics files).
Following is my App.js:
(Where I import a sample lyrics file and play it using the Lyric defined at './Lyrics)
import React from 'react';
import {SafeAreaView, View, Text} from 'react-native';
import SampleLyric from './assets/Samples.lrc';
import Lyrics from './lyrics';
const App = () => {
return (
<SafeAreaView>
<View>
<Lyrics lrc={SampleLyric} currentTime={10} />
</View>
</SafeAreaView>
);
};
export default App;
Following is my Lyrics.js file:
import React, {useCallback} from 'react';
import {Text} from 'react-native';
import {Lyric} from 'react-native-lyric';
const Lyrics = ({lrc, currentTime}) => {
const lineRenderer = useCallback(
({lrcLine: {millisecond, content}, index, active}) => (
// eslint-disable-next-line react-native/no-inline-styles
<Text style={{textAlign: 'center', color: active ? 'white' : 'gray'}}>
{content}
</Text>
),
[],
);
return (
<Lyric
// eslint-disable-next-line react-native/no-inline-styles
style={{height: 500}}
lrc={lrc}
currentTime={currentTime}
lineHeight={16}
lineRenderer={lineRenderer}
/>
);
};
export default Lyrics;
Following is my sample lyrics file:
(The initial segment of the .lrc file I'm using (it is located in the correction location I've given in the App.js)):
[length:03:05.42]
[re:www.megalobiz.com/lrc/maker]
[ve:v1.2.3]
[00:21.73]Hello world 1
[00:23.69]Hello world 2
[00:25.19]Hello world 3
[00:27.02]Hello world 4
[00:29.02]Hello world 5
[00:30.44]Hello world 6
...
Here is the error I receive.
I'm unable to provide it in text from since it's in the emulator. 
Does anybody know the reason for this error and how to solve it, please?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
