Expo Graphics is not running

Expo graphics is not working in below environment

i install from official web-site

while i import in my file it’s say that

While trying to resolve module expo-graphics from file /home/hdd/Workspace/Office/Poly/screens/HomeScreen.js, the package /home/hdd/Workspace/Office/Poly/node_modules/expo-graphics/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/home/hdd/Workspace/Office/Poly/node_modules/expo-graphics/lib/index.js. Indeed, none of these files exist:

My code

import React from ‘react’
import { ScrollView, StyleSheet, Text, View } from ‘react-native’
import Expo from ‘expo’
import ExpoTHREE, { THREE } from ‘expo-three’
import ExpoGraphics from “expo-graphics”;

export default class HomeScreen extends React.Component {

static navigationOptions = {
header: null
}

onContextCreate = async ({ gl, scale, width, height, arSession }) => {

}

onRender = (delta) => {

}

render() {
return (
<ExpoGraphics.View
style={{ flex: 1 }}
onContextCreate={() => this.onContextCreate()}
onRender={() => this.onRender()}
arEnable={true}
/>
)
}
}

const styles = StyleSheet.create({

})

My Package.json file

{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“web”: “expo start --web”,
“eject”: “expo eject”,
“test”: “jest --watchAll”
},
“jest”: {
“preset”: “jest-expo”
},
“dependencies”: {
“expo/vector-icons”: “~10.0.6”,
“react-native-community/masked-view”: “0.1.6”,
“react-navigation/bottom-tabs”: “^5.0.0”,
“react-navigation/native”: “^5.0.0”,
“react-navigation/stack”: “^5.0.0”,
“react-navigation/web”: “~1.0.0-alpha.9”,
“expo”: “~37.0.3”,
“expo-asset”: “~8.1.3”,
“expo-constants”: “~9.0.0”,
“expo-font”: “~8.1.0”,
“expo-graphics”: “^1.1.0”,
“expo-three”: “^5.4.0”,
“expo-web-browser”: “~8.1.0”,
“react”: “~16.9.0”,
“react-dom”: “~16.9.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz”,
“react-native-gesture-handler”: “~1.6.0”,
“react-native-safe-area-context”: “0.7.3”,
“react-native-screens”: “~2.2.0”,
“react-native-web”: “~0.11.7”,
“three”: “^0.115.0”
},
“devDependencies”: {
“babel/core”: “^7.8.6”,
“babel-preset-expo”: “~8.1.0”,
“jest-expo”: “~37.0.0”
},
“private”: true
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.