Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SntaxError: Unexpected token 'export' #71

Open
AchrafBn opened this issue Nov 2, 2022 · 0 comments
Open

SntaxError: Unexpected token 'export' #71

AchrafBn opened this issue Nov 2, 2022 · 0 comments

Comments

@AchrafBn
Copy link

AchrafBn commented Nov 2, 2022

I did a clone from solito-universal-app-template-nativebase-typescript and I tried to install a module "expo-camera"
then I got that error message

Steps to reproduce:

  1. run command yarn add module expo-camera in directory ./packages/app.
  2. yarn web

Message

Screenshot 2022-11-02 at 17 17 01

Sample code


import { Link as SolitoLink } from 'solito/link'
import React from 'react'
import {
  Center,
  Image,
  HStack,
  Text,
  Heading,
  Code,
  Link,
  VStack,
  Button,
  AspectRatio,
  Box,
} from 'native-base'
import { ColorModeSwitch } from '../../components'
import { Camera } from 'expo-camera';

export function HomeScreen() {
  return (
    <Box
      flex={1}
      _dark={{ bg: 'blueGray.900' }}
      _light={{ bg: 'blueGray.50' }}
    >
     <Camera 
      style={{
        height:"500px",
        width:"500px"
      }}/>
    </Box>
  )
}


Package.json in package/app


{
  "version": "0.0.0",
  "name": "app",
  "main": "index.ts",
  "dependencies": {
    "@react-navigation/native": "^6.0.8",
    "@react-navigation/native-stack": "^6.5.0",
    "expo-barcode-scanner": "^11.4.0",
    "expo-camera": "^12.3.0",
    "expo-linking": "^3.0.0",
    "native-base": "3.3.7",
    "react-native-svg": "^12.3.0",
    "react-native-web": "0.17.7",
    "solito": "0.0.22"
  },
  "sideEffects": false
}


Am i missing something in configuration ?

@AchrafBn AchrafBn changed the title SyntaxError: Cannot use import statement outside a module SntaxError: Unexpected token 'export' Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant