How to install latest sub-package with npm? - firebase

I know how to install latest package using npm:
npm i <package>#latest
but when the package is actually a sub-package it throws an error:
npm i #react-native-firebase/auth#latest
Error:
ENOENT: no such file or directory ...
strange enough I was not able to find something on google after hours of search.

i think when u use
npm install --save #react-native-firebase/app
its the latest version. try it and see the documentation.
rnfirebase

Related

Downgrade Firebase 9.6 to 9.2.0

What commands must I follow on the command line to downgrade. I ran uninstall and reinstalled as well as nom i -S firebase#... but now when I reload the app it just crashes.
If you have to install an older version of a package, just specify it
npm install <package>#<version>
For example: npm install firebase#9.2.0
You can also add the --save flag to that command to add it to your package.json dependencies, or --save --save-exact flags if you want that exact version specified in your package.json dependencies.
The install command is documented here: https://docs.npmjs.com/cli/install
If you're not sure what versions of a package are available, you can use:
npm view firebase versions
And npm view can be used for viewing other things about a package too.
https://docs.npmjs.com/cli/view
don't forget to remove .lock file first to rebuilt the depedency
can u give the error messege for us....

Package.json indicates an outdated version of firebase-functions

I have Cloud functions project and i moved the project from my old laptop to my new laptop.
I have installed everything that necessary. My problem is when i try firebase deploy it gives me that error:
! functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions#latest in your functions directory.
I did that i have been told, but still it gives me the same error.
What should i do? And how i direct the npm install to my functions directory?
You need to run sudo npm install --save firebase-functions#latest in your functions directory. Cannot be in any other directory.
In Flutter this will be in
/path_to_your_flutter_project/functions
Hope this helped someone
I had the same problem.
You just need to run npm install -g firebase-tools
npm install -g firebase-tools
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js
+ firebase-tools#7.0.0
That fixed my problem.
Update firebase-admin and make sure your root package.json file points to your functions folder

Why I can't use npm packages in meteor project?

I need to add a npm package in my meteor project (for example 'moment' package). First I typed this command :
meteor npm install --save moment .
The package.json dependencies updated (moment package added), also in node_modules.
I want to use this package, so I add this line in the client side:
const moment = require('moment');
I get this message in my browser console Uncaught SyntaxError: Unexpected identifier in this line !!
Did I miss something ?
You need to do meteor npm install meteor-node-stubs --save for this to work. See Using NPM Packages in the guide.
You can only use npm packages in meteor 1.3+. For any previous versions, you will need a wrapper package or you can use meteorhacks:npm.

Why does npm install add a bunch of other packages?

I ran npm install grunt-contrib-uglify --save-dev to my local project folder and it kept adding a bunch of other node module packages. How do I make it only install the package specified?
NPM installes package dependencies recursively. So when you install grunt-contrib-uglify it will also install chalk, lodash, maxmin, uri-path and, uglify-js. It will also then install any dependencies those packages have. You can't install just grunt-contrib-uglify because it wouldn't work without them.

Error with grunt (grunt-contrib)

If I want to install a package via npm globally, then I get the following error repeatedly... Has anybody an idea to solve this problem?
The short answer is don't install grunt-contrib. It used to be a small collection of tasks but as the grunt-contrib-* series grew, so did that library.
Nobody ever needs to install every grunt-contrib-* library. Instead, just install the tasks you need: npm install grunt-contrib-compress --save-dev
Otherwise, if you insist, install the peer dependency version it expects npm install grunt-contrib-compress#0.6.1 and try installing again: npm install grunt-contrib.

Resources