Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

194
Vistas
Could not find the declaration for module('react-native-imei')

I am trying to make a project that can give me the IMEI number of my Mobile, using this package https://github.com/SimenCodes/react-native-imei, the problem is in my code there is a statement as, const IMEI = require('react-native-imei'); here in my code it is showing kind of three dots below 'r' of 'react-native-imei' on hovering over it, it says "could not find the declaration file for module ('react-native-imei')" although I have installed and linked then package in my project so what could be the reason? below is my code:

import React from 'react'
import { StyleSheet,TouchableOpacity ,Text,View} from 'react-native'

export default class Demo extends React.Component {

  constructor () {
    super()
    this.state = {
      deviceIMEI: '',
    }
  }

  getIMEI = () => {
    const IMEI = require('react-native-imei')
    this.setState({
      deviceIMEI: IMEI.getImei(),
    })
  }

  render () {
    return (
      <View style={styles.container}>
        <Text>{this.state.deviceIMEI}</Text>
        <TouchableOpacity onPress={this.getIMEI}>
          <Text>Get Current Device IMEI</Text>
        </TouchableOpacity>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'flex-start',
  },
})

here is the image for that: enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda