Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
Unable to resolve module "./path_to_file"

I am new to React Native and I'm trying to make a little app. I followed a tutorial on how to start a CRNA project and how to test it on your phone. It worked but as soon as I created my first component, I got this error :

Building JavaScript bundle: error

Unable to resolve module ./Components/Search from C:\Users\fredd\OneDrive\Bureau\ReactNative\MoviesAndMe\App.js: 

None of these files exist:
  * Components\Search(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  * Components\Search\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  1 | import React from 'react';
> 2 | import Search from './Components/Search';
    |                     ^
  3 |
  4 | export default class App extends React.Component {
  5 |   render() {

I am a complete beginner so maybe I missed something but I am certain I did the same thing as the tutorial.

Here's my files :

App.js

import React from 'react';
import Search from './Components/Search';

export default class App extends React.Component {
  render() {
    return (
      <Search/>
    );
  }
}

search.js (the component)

import React from "react";
import {View, Button, TextInput} from 'react-native';

class Search extends React.Component {
    render() {
        return (
            <View>
                <TextInput placeholder="Titre du film"/>
                <Button title="Rechercher" onPress={() => {}}/>
            </View>
        )
    }
}

export default Search;

Could you help me please ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

As your search.js is lowercase you need to import it like this import Search from './Components/search';

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda