Reputation: 488
I'm new to React and I'm trying to create a Firebase web app using it. When I created my initial build, I put my firebase configuration in a separate js file from my app. When I try and run npm start
to test it, I get the following error:
./src/Login.js
Module not found: Can't resolve 'firebaseConfig' in 'C:\Users\...\...\...\...\src'
The file in question is below:
import * as firebase from "firebase/app";
import "firebase/auth"
import React from "react";
const config = {
//relevant configuration details
};
const firebaseApp = firebase.initializeApp(config);
export default firebaseApp;
I'm using it in other js files via
import React, {Component} from 'react';
import firebaseApp from "firebaseConfig";
I've tried deleting the file and rewriting it. I've checked my directories to make sure I have the correct dependencies and the firebaseConfig file is in the same folder as the Login file. I'm stuck. Does anyone know how I can fix this?
Upvotes: 1
Views: 874