Issues encountered when attempting to lower the version of firebase sdk npm package in a react-native project

Recently, I encountered a challenge with my firebase firestore. After some research, I discovered that reverting the version from 7.9.1 to 7.8.2 should fix the issue.

npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5a3c33283f383b293f1a6d74627468">[email protected]</a>

After implementing this solution, the problem seemed to be resolved. However, upon reinstallation of the application, the issue resurfaced. It seems like there might be an interference from npm or react-native caches causing the higher versions of firebase to be used. Any insights into what could potentially be causing this?

Answer №1

To ensure a clean cache on my Linux Workstation, I have incorporated the following lines into the script section of my package.conf:

"scripts": {
        ...
        "clean-start": "rm -rf ./node_modules && yarn install && watchman watch-del-all && rm -rf $TMPDIR/haste-map-react-native-packager-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf $TMPDIR/react-*",
        "kill_MetroBundler": "lsof -i :8081 | grep node | awk '{print $2}'| head -1 | xargs kill",
        ...
    },

This allows you to simply execute npm clean-start and npm kill_MetroBundler before proceeding with npm start once more.

I trust this solution proves beneficial to you.

By the way: At times, deleting your yarn.lock or npm-lockfile may be necessary to fully eliminate outdated dependencies.

Answer №2

A caching issue was causing the problem, but I managed to resolve it by executing the commands below:

rm -rf ./node_modules && yarn install && watchman watch-del-all

After running these commands, the problem was successfully fixed.

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

I'm perplexed as to why my react application appears perfectly on certain devices, yet on newer ones it simply showcases a blank white screen

My application is functioning properly on older Mac computers, but it is not displaying correctly on iPhones or newer models of Macs. I have searched online for hours trying to find a solution, but nothing seems to make much sense to me. Can anyone please ...

Installing npm packages on Kudu doesn't seem to have any effect

Earlier today, I executed npm install and the node_modules directory was created with all the necessary files. However, a few hours later, when I ran the same command with the same package.json file, there were no errors, but the node_modules directory wa ...

Guide on transferring numerous files (50k+) from a folder to AWS S3 using node.js

Currently, my Node.js API on a Windows machine is generating numerous XML files that are later sent to an S3 bucket. The quantity of files sometimes surpasses 50k. For the uploading process, I am utilizing the aws-sdk package. Essentially, I iterate throu ...

NPM Error: File Not Found

After attempting to check global modules, I encountered an ENOENT error. What could be causing this issue and how can it be prevented? https://i.stack.imgur.com/k9GaZ.png ...

The appearance of an unforeseen * symbol caused a

Having issues with this particular line of code, import * as posenet from '@tensorflow-models/posenet' The error 'Uncaught SyntaxError: Unexpected token *' keeps popping up, I have the latest version of Chrome installed and I've ...

What is the process for defining a state using React Native and TypeScript?

Recently, I've embarked on my journey with React Native and decided to incorporate TypeScript into my development process. As I attempted to set my state, an error popped up that reads as follows: An issue arose while trying to assign the argument &a ...

Version 4.0.1 update has caused create-react-app to stop functioning

After attempting to install create-react-app with different methods such as npm i create-react-app, npx create-react-app new-app, and npm init react-app new-app, I consistently encounter the following error message: The version of create-react-app instal ...

The React Native File generator

Currently, we are utilizing redux actions in our web project. In an effort to share logic between web and native applications, we have integrated these actions into our react native project with the intention of only having to modify the components. One o ...

Error 404: Unable to locate webpack bundle.js

As I dive into learning about Webpack configuration, I keep encountering errors in my console. It appears that my webpack app.bundle.js file is not being found. The page successfully loads with the content of my HTML file displaying, but the app.bundle.js ...

Can you explain the distinction between using get() and valueChanges() in an Angular Firestore query?

Can someone help clarify the distinction between get() and valueChanges() when executing a query in Angular Firestore? Are there specific advantages or disadvantages to consider, such as differences in reads or costs? ...

NPM encounters issues when attempting to install type definitions

Encountering an issue with npm install failing to install @types has left me puzzled. The command below functions correctly: npm install --save lodash However, trying to install types results in errors: npm install --save @types/lodash PS C:\Deve ...

npm error | Module '@emotion/styled' not found

My Node project is encountering a new issue that wasn't present yesterday. The only change I can think of is an OS update the previous night on Ubuntu 20.04. Stack trace: [nodemon] 2.0.15 [nodemon] to restart at any time, enter `rs` [nodemon] watchin ...

Initiate and terminate npm using a PHP script

Can you launch npm from a PHP script using the browser? For instance, by implementing the following code? // start.php echo exec('npm run forever'); die(); And to halt node execution: // stop.php echo exec('npm run stopforever'); die ...

Firestore Query sends data object to browser

When making a Firestore query, the browser is displaying [object Object],[object Object] instead of the expected output: router.get('/jobopportunities', async(req, res) => { var jobArray = []; const snapshot = await fireba ...

Using the digitallyseamless/nodejs-bower-grunt docker image to containerize npm and bower installations

I've been exploring the possibilities of using Docker to execute npm and bower install commands. Below is my setup: ./package.json { "name": "bignibou-client", "version": "0.1.0", "engines": { "node": "0.10.x" }, "devDependencies": { ...

Troubleshooting the error code 89 from the Twitter API

Recently, when running my app, an error message popped up that read: "[ { code: 89, message: 'Invalid or expired token.' } ]". I'm puzzled as to why this is happening. About a week ago, everything was functioning smoothly. Even after genera ...

Where Can I Find Node and Which Command Should I Use for npm if They Are Not Available?

After setting up the Linux subsystem on my Windows (Ubuntu) system, I tried to execute node scripts but encountered an error message: Command 'node' not found, but can be installed with:sudo apt install nodejs Oddly enough, I already have node ...

What steps are involved in constructing Jodit from scratch?

Seeking a non-minified, readable version of Jodit, I attempted to build it myself. However, my lack of experience with composer, node, npm, webpack, TypeScript, and other tools has left me struggling. Is there anyone who can guide me through the process s ...

Global installation of all dependencies listed in the package.json file

When it comes to installing packages globally, we often use the command npm install -g package1 package2. However, I recently uploaded a second app on a server and need to install all the packages listed in the package.json file. Some of these packages wer ...

Jenkins Docker build fails for React app, while the local build is successful

When I run npm run build on my local machine, everything works perfectly. However, when I try to run it on a Docker image launched through Jenkins, I encounter some issues: Cannot find module: 'file-saver'. Make sure this package is installed. Y ...