Open ednilsoncs opened 3 years ago
I am also getting this error. Did you find a fix?
I am also getting same issue, Did you find way to fix this issue?
Same here, Does someone have a workaround? Version: "react-native": "0.64.2", "react-native-qrcode-svg": "^6.1.2", "react-native-svg": "^12.1.1",
When trying
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import QRCode from 'react-native-qrcode-svg';
export default function App() {
return (
<View style={styles.container}>
<QRCode value='hello world!'/>
<StatusBar style="auto" />
</View>
);
}
I am getting this error as well
TypeError: _qrcode.default.create is not a function. (In '_qrcode.default.create(value, { errorCorrectionLevel: errorCorrectionLevel })', '_qrcode.default.create' is undefined)
package.json info:
"react-native": "0.70.5", "react-native-qrcode-svg": "^6.1.2", "react-native-svg": "^13.6.0"
Hello? Has anyone solved this yet?
Just solved this!
This is as a result of your dependencies in your package.json
Ensure you have the correct dependencies(react-native-svg) installed suitable for react-native-qrcode-svg.
This is the dependency worked for me:
{
"name": "qrcode",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~47.0.12",
"expo-status-bar": "~1.4.2",
"react": "18.1.0",
"react-native": "0.70.5",
"react-native-qrcode-svg": "^6.2.0",
"react-native-svg": "13.4.0",
"expo-splash-screen": "~0.17.5",
"expo-dev-client": "~2.0.1",
"expo-barcode-scanner": "~12.1.0"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true
}
To install correct dependency, use npx expo install your package
I added the following code:
he returned the following error to me:
Version: "react-native": "0.64.0", "react-native-qrcode-svg": "^6.1.0", "react-native-svg": "^12.1.1-0",