My Expo App will not Compile for web with Ui-Kitten

296 Views Asked by At

I am currently trying to export an application I created to web with ui-kitten and expo, I am currently encountering an issue with ui-kitten.

When I try to run the command:

npx expo export:web

I recieve this error:

Failed to compile
CommandError: Module parse failed: Unexpected token (19:16)
File was processed with these loaders:
 * ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|         // @ts-ignore - UI Kitten components pass here `tintColor`
|         const fillColor = react_native_1.StyleSheet.flatten(style || {}).tintColor;
>         return (<Icon style={props.style} fill={fillColor} {...svgProps}/>);
|     }
| }

I did some research recently, and found some interesting bugs svg react-native and eva-icons. Am I supposed to go to some different version?

It is good to note that I have this error when installing packages,


npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-native-svg
npm WARN   peer react-native-svg@"*" from @ui-kitten/[email protected]
npm WARN   node_modules/@ui-kitten/eva-icons
npm WARN     @ui-kitten/eva-icons@"^5.3.1" from the root project
npm WARN   2 more (the root project, @ui-kitten/components)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-native-svg@"^9.4.0" from [email protected]
npm WARN node_modules/@ui-kitten/eva-icons/node_modules/react-native-eva-icons
npm WARN   react-native-eva-icons@"^1.3.1" from @ui-kitten/[email protected]
npm WARN   node_modules/@ui-kitten/eva-icons
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-native-svg
npm WARN   peer react-native-svg@"^9.4.0" from [email protected]
npm WARN   node_modules/@ui-kitten/eva-icons/node_modules/react-native-eva-icons
npm WARN     react-native-eva-icons@"^1.3.1" from @ui-kitten/[email protected]
npm WARN     node_modules/@ui-kitten/eva-icons

I have tried re-installing several times different version of react-native svg and react-native-eva icons based on uikitten docs.

Wat I am expecting is for the application on web to work fine when I export, and it does not. I am able to run on my Android simulator fine.

expo install [email protected]

This command also does not help fix the issue, i have tried re-installing several of the icons and it all produces the same era

package.json :

{
  "name": "easy-meets",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@eva-design/eva": "^2.2.0",
    "@expo/webpack-config": "^18.0.1",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/geolocation": "^3.0.6",
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/material-top-tabs": "^6.6.2",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/stack": "^6.3.16",
    "@supabase/supabase-js": "^2.22.0",
    "@ui-kitten/components": "^5.3.1",
    "@ui-kitten/eva-icons": "^5.3.1",
    "axios": "^1.4.0",
    "expo": "~48.0.15",
    "expo-font": "^11.1.1",
    "expo-location": "~15.1.1",
    "expo-status-bar": "~1.4.4",
    "force": "^0.0.3",
    "i": "^0.3.7",
    "npm": "^9.6.7",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.8",
    "react-native-pager-view": "6.1.2",
    "react-native-svg": "13.4.0",
    "react-native-swipe-cards": "^0.1.1",
    "react-native-tab-view": "^3.5.1",
    "react-native-url-polyfill": "^1.3.0",
    "react-native-web": "~0.18.10"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

0

There are 0 best solutions below