Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Can't get example to work #53

Open
LeoTheG opened this issue Jan 17, 2019 · 4 comments · May be fixed by #228
Open

Can't get example to work #53

LeoTheG opened this issue Jan 17, 2019 · 4 comments · May be fixed by #228

Comments

@LeoTheG
Copy link

LeoTheG commented Jan 17, 2019

I have had no luck getting the example to work, any guidance is appreciated. Steps I followed:

expo init example && cd example
yarn add expo-pixi
yarn start

package.json dependencies:

  "dependencies": {
    "expo": "^32.0.0",
    "expo-pixi": "^0.3.2",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
  },

the error I get:

TypeError: undefined is not an object (evaluating '_expo.default.GLView')

This error is located at:
    in _default (at withExpoRoot.js:22)
    in RootErrorBoundary (at withExpoRoot.js:21)
    in ExpoRootComponent (at renderApplication.js:34)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AppContainer (at renderApplication.js:33)
* App.js:6:8 in _default
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:10865:22 in mountIndeterminateComponent
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14091:21 in performUnitOfWork
- ... 17 more stack frames from framework internals

My App.js is copy-pasted from the example

import React from 'react';
import Expo from 'expo';
import ExpoPixi from 'expo-pixi';

export default () => (
  <Expo.GLView
    style={{ flex: 1 }}
    onContextCreate={async context => {
      const app = ExpoPixi.application({ context });
      const sprite = await ExpoPixi.spriteAsync(
        'http://i.imgur.com/uwrbErh.png',
      );
      app.stage.addChild(sprite);
    }}
  />
);

Is this an error on my part or is there something wrong here? Thanks

Edit: Have not resolved this yet sorry gave up for the meanwhile (1-25-19)

@mdivani
Copy link

mdivani commented Jan 25, 2019

Hi were you able to resolve this? I'm having same issue

@mohamed-sultan
Copy link

how did you resolve this plz?

@apurvamulay
Copy link

apurvamulay commented Feb 3, 2019

Try import {GLView} from 'expo'; OR import * as Expo from 'expo'

@haoolii
Copy link

haoolii commented Jul 20, 2019

This is very odd
I use this and it can work

import { GLView } from 'expo-gl'

I think it's not stable :(

@Bartozzz Bartozzz linked a pull request May 29, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants