expo / expo-electron-adapter

This package wraps `electron-webpack` and adds support for Expo web and other universal React packages.
MIT License
29 stars 11 forks source link

Uncaught Error when running expo-electron start #1

Open woltob opened 3 years ago

woltob commented 3 years ago

Dear community,

I'm receiving a

`.......frontend_expo/node_modules/react-native/index.js:14 import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo'; ^^^^^^

SyntaxError: Unexpected token typeof at new Script (vm.js:83:7) at createScript (vm.js:265:10) at Object.runInThisContext (vm.js:313:10) at Module._compile (internal/modules/cjs/loader.js:712:26) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (/Users/tobias/Documents/PRIOjet/source_code/frontend_expo/src/components/theme/modal/modalPanel.component.tsx:8:1)`

Error when running expo-electron start on my expo app. I configured everything according to the documentation.

Has anyone had this before and how did you solve this? Where to look?

It might be related to the @ui-kitten library, but I couldn't find anything regarding this.

Thanks a thousand!

clintgallivan commented 3 years ago

Has anyone solved this issue? I am trying to use a react-native library "victory-native" and have it work in electron. I am getting the same issue except instead of "imports" its "exports".

@woltob it feels to me that it is related to the ui-kitten library because I found that solution which fixed my expo for web issue and now I am here with this same issue.

AntoineValente commented 2 years ago

@woltob @clintgallivan I had the same issue and it was related to ui-kitten. I've managed to fix this by adding "build": { "babel": { "include": [ "@ui-kitten/components" ] } in the "web" section in the app.json file, as mentioned in the doc of ui-kitten (https://akveo.github.io/react-native-ui-kitten/docs/guides/getting-started#manual-installation)