Angular version 8.2 combined with Firebase can result in errors such as those found in the `./src/app/app.module.ngfactory.js` file towards the end of the process when attempting to build with

My first time posing a query on this platform, and certainly not my last.

The issue at hand involves the ng-build --prod process failing to complete and throwing errors in my Angular 8.2.14 application. I've integrated Firebase into my project successfully, receiving data and passing it to the HTML. However, when attempting to build for production to deploy on Heroku, multiple

ERROR in ./src/app/app.module.ngfactory.js
messages appear, indicating missing Firebase-related elements from the mentioned Firebase library.

Errors:
- "export 'FirebaseNameOrConfigToken' (imported as 'i13') was not found in '@angular/fire'"
- "export 'FirebaseOptionsToken' (imported as 'i13') was not found in '@angular/fire'"
- "export 'RealtimeDatabaseURL' (imported as 'i13') was not found in '@angular/fire'"
- "export '_firebaseAppFactory' (imported as 'i13') was not found in '@angular/fire'"

I am relatively new to Angular and used the CLI to generate both my project and its components. I've attempted deleting the node_modules folder and performing an npm install to rule out caching issues. Despite trying to follow advice by updating dependencies like @angular/compiler and @angular/compiler-cli to version 6.1.1 based on similar cases mentioned in this thread, the problem persists.

Your insights and suggestions on this matter would be greatly appreciated! Thank you for taking the time to assist.

Here's a glimpse of my package.json configuration:


{
  "name": "break-trainer",
  "version": "0.0.0",
  "engines": {
    "node": "6.13.4",
    "npm": "3.10.10"
  },
  "scripts": {
    "ng": "ng",
    "start": "node server.js",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "heroku-postbuild": "ng build --prod"
  },
  "private": true,
  ...
}

Answer №1

One solution could be to downgrade your @angular/fire version to 5.4.2 based on the project's CHANGELOG. According to the changelog, starting from 6.0.0-rc.0 (2020-01-30) -

  • Angular versions less than 9 are no longer supported
  • Firebase versions less than 7.8 are no longer supported
  • firebase-tools versions less than 7.12 are no longer supported

Furthermore, after downgrading (or upgrading Angular to version 9), it is essential to ensure that firebase and angularfire versions are compatible.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

applying attributes to an element

Can you tell me why the addClass method is adding the class 'foo' to both the div and p element in the code snippet below? $('<div/>').after('<p></p>').addClass('foo') .filter('p').attr ...

Mastering Vuex: effectively managing intricate data structures and dynamic state transformations

Let's say I'm utilizing an external API that interacts with Machine objects. With the API, you can create a Machine using createMachine, resulting in a complex object with various nested properties and functions to modify its state. The API inclu ...

Populate a JSON table in React with checkboxes and automatically mark them based on the JSON data

I'm currently working on creating a React table using JSON data like this: [ { "Id_side": 123, "Name_side": "R4", "Name_cycle": "C1" }, { "Id_side": 345, "Name_side": "M1", "Name_cycle": "C2" ...

Double Marker Challenge in Brochure

I am currently using Leaflet in conjunction with VueJs. I have encountered an issue where a double marker is appearing at a specific location when I add a marker: The code responsible for this behavior is as follows: mounted() { this.map = L.ma ...

What is the purpose of a form that includes a text input field and a button that triggers a JavaScript function when the enter key is pressed?

<form action=""> <input id="user_input" onKeyDown="if(event.keyCode == 13)document.getElementById('okButton').click()" > <input id="okButton" type="button" onclick="JS_function();" value="OK"> </form> I'm trying to a ...

Issue with URL parameter in React when using React Router

Initially, everything was running smoothly in my React project using react-router-dom. However, once I added another Route like so: <Route path="/edit/:id" component={EditPage}/> and tried changing the URL in the browser to http://localhos ...

Is there a way to remove a portion of a string?

Looking to remove a section of a string using JavaScript? I attempted var sentence = "C:\mnt\c\User\Foo\Bar"; var updatedSentence = sentence.replace("mnt\c", ""); But the result was not as expected ...

Is there a way to schedule a function to run every 6 hours in node.js based on actual time instead of the device's time?

var currentTime = new Date().getHours(); if(currentTime == 6){ //function Do stuff } if(currentTime == 12){ //function Do stuff } if(currentTime == 18){ //function Do stuff } if(currentTime == 24){ //function ...

In order for Angular jQuery click events to properly function, they must be triggered by a

My admin panel is built using jQuery and Bootstrap, and it functions properly when used outside of the Angular framework. However, after integrating jQuery and Bootstrap into an Angular project and configuring them, I noticed that I had to double click on ...

Axios is passing an array instead of a JSON object when making a POST request

I am trying to make a post request using axios in my Vue.js front-end to communicate with Laravel on the backend. const data = { file: {id} } axios.post('api/documents/remove', data).then((response) => { ...

Exploring the Depths of NodeJS X-Ray Web-Scraper: Uncovering Hidden Gems within Sub Pages

Currently, I am attempting to scrape content using the node.js x-ray scraping framework. While I have successfully retrieved data from a single page, I am struggling with navigating through links and extracting content from subpages simultaneously. Althou ...

Unable to find JSON data using the Javascript Kafka Magic Tool, as no results are being

In JSON format, I have a message that contains various details. My goal is to utilize Javascript search functionality to identify if the EmailAddress matches the specific value I am looking for within hundreds of similar messages: "Message": { ...

Using a variety of images to fill various shapes on a grid canvas

I'm currently working on creating a hexagonal grid using canvas, with the goal of filling each tile with a unique pattern taken from an image. However, the code I have written seems to be applying the same image pattern to every tile in the grid, resu ...

Prevent the page from automatically scrolling back to the top when a user clicks on a "read more"

When implementing the function below on an HTML page to show/hide more details about a comment, there is an issue where the page scrolls up to the top whenever the "read more" link is clicked. This can be frustrating as it takes the user away from the comm ...

Transform the object into an array of JSON with specified keys

Here is a sample object: { labels: ["city A", "city B"], data: ["Abc", "Bcd"] }; I am looking to transform the above object into an array of JSON like this: [ { labels: "city A", data: "Abc" }, { labels: "city B", data: "Bcd" }, ]; ...

Leveraging HTML and PHP for integrating date and mobile number functionalities

I am a beginner in HTML and PHP. I have encountered an issue where the data displayed shows as "0000-00-00" for dates and if the mobile number entered is less than 9 characters, it displays the same numbers repeatedly. However, when I enter 10 digits for t ...

Optimizing Wordpress by Efficiently Enqueueing Javascript

As a beginner with a WordPress website, I am aware that in order to execute scripts on a WordPress page, they need to be enqueued in the functions.php file. However, I'm unsure about the correct process for this. The specific JavaScript file I want t ...

Utilizing Vue JS for applying multiple filters on a single array

I'm currently facing challenges in optimizing my code. I've successfully created dynamically generated objects from an array, implemented a search function, and had a working filter (just one) at some point. However, my attempt to chain the filte ...

Struggling to verify credentials on CouchDB

I'm currently facing an issue with authentication while trying to access a couch server from a web application served on port 80. The credentials seem to be removed when passing them in the URL and the session cookie isn't sent to the server. He ...

Navigating through async functions in an Express.js router

Encountered a lint error indicating that Promises cannot be returned in places where a void is expected. Both functions [validateJWT, getUser] are async functions. Any suggestions on how to resolve this issue without compromising the linter guidelines by u ...