Reputation: 101
I get the following error in my ios simulator
Unable to resolve module react-native from / Users/myname/source/sandbox/auth/src/components/LoginForm.js: Module does not exist in the module map or in these directories:
/Users/myname/source/sandbox/auth/node_modules
I went ahead and followed the directions for clear watchman as stated. Closed out my terminal, restarted my computer.
I researched on here and other sources. Found one work around to install an older version of firebase. I installed [email protected] same error came up.
Here's my app component
import React, { Component } from 'react';
import { View } from 'react-native';
import firebase from 'firebase';
import { Header } from './components/common';
import { LoginForm } from './components/LoginForm';
class App extends Component {
componentWillMount() {
firebase.initializeApp({
apiKey: "myApiKey",
authDomain: "myDomain",
databaseURL: "myURL",
storageBucket: "myStorageBucket",
messagingSenderId: "myMessengerID"
});
}
render () {
return (
<View>
<Header headerText="Authentication" />
<LoginForm />
</View>
);
}
}
export default App;
LoginForm component
import React, { Component } from 'react';
import { View } from 'react-natvie';
import { Button, Card, CardSection } from './common';
class LoginForm extends Component {
render() {
return (
<Card>
<CardSection />
<CardSection />
<CardSection>
<Button>
Log In
</Button>
</CardSection>
</Card>
);
}
}
export default LoginForm;
Any help would be much appreciated!
Upvotes: 0
Views: 4543
Reputation: 8542
You misspelled react-native
import in the beginning of your LoginForm
component.
Upvotes: 2