When Firebase cli is not installed globally, you might encounter issues when trying

Currently using my work computer to work on a side project where I am exploring new features of Firebase. However, I ran into an issue since I am unable to install modules globally on this corporate device. When trying to install firebase-cli with the recommended global command:

npm install -g firebase-tools

I encountered permission errors due to restrictions on this work computer. As a workaround, I created a dedicated firebase folder for this project and proceeded to run:

npm install firebase-tools

within that folder. After installation, I attempted to check the version by running:

firebase -version

However, it returned an error message stating:

firebase: command not found

Despite being in the directory where Firebase was installed, the command did not work as expected. Any assistance or advice would be greatly appreciated!

Answer №1

To execute a command from a package that has been installed in your project, navigate to the project folder and use npm exec.

npm exec -- firebase [CLI args]

If you want to check the version of the Firebase command, run the following command (remember to use two dashes for the flag)

npm exec -- firebase --version

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

Suddenly, the private react-native library seems to have disappeared from view despite being clearly present in the node_modules directory

I'm currently working on a react-native project that relies on a private react-native library. Up until recently, everything was running smoothly. However, I've encountered an issue where I'm seeing the error message Cannot find module &apos ...

Setting the backEnd URL in a frontEnd React application: Best practices for integration

Hey there - I'm new to react and front-end development in general. I recently created a RESTful API using Java, and now I'm wondering what the best way is to specify the backend URL for the fetch() function within a .jsx file in react. Currently, ...

Attempting to perform an API invocation on a distant endpoint utilizing NestJS

var unirest = require("unirest"); var req = unirest("GET", "https://edamam-edamam-nutrition-analysis.p.rapidapi.com/api/nutrition-data"); req.query({ "ingr": "1 large apple" }); req.headers({ &qu ...

NodeJS error: Attempted to set headers after they have already been sent to the client

As a beginner, I have encountered an error message stating that the API is trying to set the response more than once. I am aware of the asynchronous nature of Node.js but I am struggling to debug this issue. Any assistance would be greatly appreciated. rou ...

Collect all wallet objects and store them in an array of objects within BitGO for Bitcoin

My Setup: Using the Mongoose module to handle all MongoDB operations, we generate and store a wallet inside a Mongo collection for each new user. METHOD: By using User.find({}, function(err, docs) {, we can retrieve each user object. User.find({}, functi ...

proxy-backed instantiation of node chaincode

Currently, I am referencing the official documentation: I am in the process of constructing my inaugural network. However, when attempting to initialize the node version chaincode, NPM consistently presents me with a network exception due to the fact that ...

The Angular 2 project, built with the CLI tool, has been transformed into an npm

We have a project in the works that involves creating a large application using angular 2. This project consists of one main parent angular 2 application and three separate sub-child applications that are unrelated to each other. Each of these sub-child ...

How should I organize mySQL code within a nodejs application?

Lately, I've been working on a project and utilizing node.js as my backend. Instead of using MongoDB, I've opted for MySQL as my DBMS due to specific requirements in my project. However, I'm facing challenges in structuring my MySQL queries ...

Challenges in verifying user identities and maintaining session continuity in passport.js/Node.js

Currently, I am in the process of setting up passport for authentication on my node.js web application. However, I am encountering some difficulties with properly storing session data. Right now, it seems like the session data is not being stored at all. ...

Can you insert a Pug anywhere within a document?

I've been following a tutorial on Jade (now Pug) at https://www.youtube.com/watch?v=l5AXcXAP4r8. The instructor placed an 'extends filename' in the middle of the index.jade file at 24:25. However, when I tried to execute it with Pug, I recei ...

Saving information in binary format to a file

I have a script for setting up an installation. This specific script is designed to access a website where users can input values and upload a certificate for HTTPS. However, the outcome seems to be different from the expected input file. Below is the cod ...

Receiving a blank array when attempting to save post categories

I am currently facing an issue with two schemas in my project - the category schema and the article schema. The user is required to input a title, summary, and select some categories. While the categories are successfully being uploaded to the category sch ...

Link a YAML file with interfaces in JavaScript

I'm currently learning JavaScript and need to convert a YAML file to an Interface in JavaScript. Here is an example of the YAML file: - provider_name: SEA-AD consortiumn_name: SEA-AD defaults: thumbnail Donors: - id: "https://portal.brain ...

Display only the essential NPM audit errors during the Azure Pipeline build process

When running NPM audit on my Azure Pipeline build, I am utilizing a custom command: npm audit --registry=https://registry.npmjs.org/ | Select-String -Pattern ( "Critical") -Context 0,10 The purpose of this command is to only fail the step if t ...

Is there a way to establish distinct PouchDBs on different endpoints within a single Node application, each residing in its own unique disk database?

Express-pouchdb, a component of Pouchdb-server, is described as a "fully qualified Express application" that creates a database in Node which is mostly compatible with CouchDB. This database allows browser-based PouchDB instances to sync data to it. My ob ...

Having Trouble with Bcrypt Saving Your Password?

Having trouble with saving a new password to the database when hashing it? I am utilizing MongoDB, NodeJS, and Passport for allowing users to change their passwords. UserSchema.pre('save', function(next) { var user = this; var SALT_FACTOR = ...

What is the purpose of using the http module to specify the port when the app.listen function already sets the

var express = require("express"); var app = express(); // This code sets the port to 8080 by default, or else it will use the environment-specific port. app.set('port', process.env.PORT || 8080); app.get('/', function(req, res){ r ...

Stopping a Powershell script while it is running in React can be achieved by utilizing

Running some simple files using React in Powershell and trying to stop the script. When attempting Ctrl+c, it only displays stopping endlessly. Ultimately, I find myself having to close out of Powershell and utilize task manager to end the npm scripts. Ev ...

Javascript Library Issue: "Implicitly Declared Type 'Any' Error"

I am currently in the process of developing a JavaScript library that will interact with an API. My goal is to create a module that can be easily published on npm and utilized across various frameworks such as Angular or React. Below is the code snippet fo ...

Is there a way to effectively deploy a node.js application on Azure using git when the application is located within a subfolder?

I have an existing git repository for a solution consisting of multiple projects, both .Net and Node.js. My goal is to use git to deploy certain projects to Azure Web sites. Deploying an ASP.Net project located in a subfolder was a breeze thanks to Scott ...