title: Expo Constants package error relating to Expo Camera, relating to SDK 34
body: <p>I have a message which I can't remove when running my application</p>
  
  <blockquote>
    <p>The following APIs have moved to separate packages and importing them
    from the "expo" package is deprecated: Constants.</p>
    
    <p>Add correct versions of these packages to your project using:</p>
    
    <p><code>expo install expo-constants</code></p>
    
    <p>If "install" is not recognized as an expo command, update your
    expo-cli installation.</p>
    
    <p>Change your imports so they use specific packages instead of the
    "expo" package:</p>
    
    <p><code>import { Constants } from 'expo' -&gt; import Constants from
    'expo-constants'</code></p>
  </blockquote>
  
  <p>I am installed the necessary package as directed, but still getting this error while trying to use the camera package in expo</p>
  
  <p>below is my camera component code</p>
  
  <p>Camera.js</p>
  
  <pre><code>import React, { Component } from 'react';
  import { View, StyleSheet, TouchableOpacity, Text,
  Alert, Modal, } from 'react-native';
  import * as Permissions from 'expo-permissions';
  import { Camera } from 'expo-camera';
  import { Constants } from 'expo-constants';
  import { Entypo, MaterialIcons, MaterialCommunityIcons,
    SimpleLineIcons } from '@expo/vector-icons';
  import { connect } from 'react-redux';
  
  class Camera extends Component {
    static navigationOptions = {
      header: null
    }
  
    constructor(props) {
      super(props);
      this.state = {
        hasCameraPermission: null,
        type: Camera.Constants.Type.back,
        picture: null
      };
    }
  
    async componentDidMount() {
      const { status } = await Permissions.askAsync(Permissions.CAMERA);
      this.setState({ hasCameraPermission: status === 'granted' });
    }
  
    takePicture = async () =&gt; {
      if (this.camera) {
        console.log('');
  
        const photo = await this.camera.takePictureAsync({ base64: true });
  
        this.setState({
          foo: Math.random()
        });
  
        const formData = new FormData();
        formData.append('image', photo.base64);
        formData.append('type', 'base64');
  
        this.setState({
          picture: photo.uri,
          isCameraVisible: false
        });
      }
    };
  
    openCamera = () =&gt; {
      const { hasCameraPermission } = this.state;
      if (!hasCameraPermission) {
        Alert.alert('Error', 'No access to camera');
      } else {
        this.setState({ isCameraVisible: true });
      }
    };
  
    closeCamera = () =&gt; {
      this.setState({
        isCameraVisible: false
      });
    };
  
    flipCamera = () =&gt; {
      this.setState({
        type: this.state.type === Camera.Constants.Type.back
          ? Camera.Constants.Type.front
          : Camera.Constants.Type.back,
      });
    };
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/bfD3Z.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bfD3Z.jpg" alt="enter image description here"></a></p>