expo / expo-three

Utilities for using THREE.js on Expo
MIT License
750 stars 92 forks source link

currently not support expo 44 #238

Open kennedy0527 opened 2 years ago

kennedy0527 commented 2 years ago

just follow the quick start npx create-react-native-app -t with-three

start app with ios simulator

error just came up from start Simulator Screen Shot - iPhone 13 Pro - 2021-12-22 at 17 57 00

but expo web is working perfectly

anyone can help with this?

package.json

{
  "dependencies": {
    "expo": "^44.0.0",
    "expo-gl": "~11.1.1",
    "expo-three": "~5.7.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-web": "0.17.1",
    "three": "^0.122.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  }
}
kennedy0527 commented 2 years ago

after some test just found out that expo-three currently doesn't support expo 44

downgrade to expo 43 works for me

jedahan commented 2 years ago

May I suggest we re-open this issue to track when SDK44 is supported?

kennedy0527 commented 2 years ago

sure

jedahan commented 2 years ago

Same error with expo-three@6.0.1 and three@0.136.0

{
  "dependencies": {
    "expo": "^44.0.0",
    "expo-gl": "~11.1.1",
    "expo-three": "^6.0.1",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-web": "0.17.1",
    "three": "^0.136.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "expo-cli": "^5.0.3"
  },
  "scripts": {
    "expo": "expo",
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "version": "1.0.0",
  "private": true,
  "name": "expo-three-six"
}
interhub commented 2 years ago

The same error ((

NikitaDudin commented 2 years ago

Temporary solution:

  1. Replace "expo-three": "..." on "expo-three": "git+https://github.com/NikitaDudin/expo-three.git#expo-44-tmp" in the package.json.
  2. Remove node_modules and yarn.lock(or package-json.lock for npm). Clear caches: yarn cache clean or npm cache clear
  3. Install dependencies:
    yarn

    or

    npm i
greg-lancet commented 2 years ago

Temporary resolution:

  1. Replace "expo-three": "..." on "expo-three": "git+https://github.com/NikitaDudin/expo-three.git#update-for-expo-44" in the package.json.
  2. remove node_modules and yarn.lock(or package-json.lock for npm).
  3. install dependencies:
 yarn

or

npm i

Um, thanks for helping but when doing your solution it seems like I can't compile the dependencies anymore (using yarn): package.json: { "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" }, "dependencies": { "@react-native-async-storage/async-storage": "~1.15.0", "expo": "~44.0.0", "expo-file-system": "~13.1.0", "expo-gl": "^11.1.1", "expo-localization": "~12.0.0", "expo-status-bar": "~1.2.0", "expo-three": "git+https://github.com/NikitaDudin/expo-three.git#update-for-expo-44", "react": "17.0.1", "react-dom": "17.0.1", "react-native": "https://github.com/expo/react-native/archive/sdk-44.0.0.tar.gz", "react-native-web": "0.17.1", "three": "^0.136.0" }, "devDependencies": { "@babel/core": "^7.12.9" }, "private": true } error: set -eo pipefail ^^^^^^^^

SyntaxError: Unexpected identifier at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1031:15) at Module._compile (node:internal/modules/cjs/loader:1065:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

NikitaDudin commented 2 years ago

@Swourire updated link on: "expo-three": "git+https://github.com/NikitaDudin/expo-three.git#expo-44-tmp" with included build folder.

greg-lancet commented 2 years ago

@Swourire updated link on: "expo-three": "git+https://github.com/NikitaDudin/expo-three.git#expo-44-tmp" with included build folder.

Unfortunately it still gives the same error, any idea where it comes from? (removing the custom link package makes it build smoothly)

NikitaDudin commented 2 years ago

@Swourire maybe replace "react-native": "https://github.com/expo/react-native/archive/sdk-44.0.0.tar.gz" on "react-native": "0.64.3"

fax1ty commented 2 years ago

@NikitaDudin Yeah, it's actually worked. @kennedy0527 Just paste

  "resolutions": {
    "@expo/browser-polyfill": "^1.0.0"
  }

to your package.json to avoid using dirty way playing with SDK versions More about resolutions: https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/ npm alternative: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

kcinnay001 commented 2 years ago

Still doesnt work

JSneak commented 2 years ago

Still doesnt work

@kcinnay001 are you using an android device? The solution works for IOS but not Android for me.