Pkg: Error reading from file. when attempting to check firebase CLI version in the console (firebase -V)

1.8k Views Asked by At

This is the message that appears in my console after running (npm install -g firebase-tools)

npm install -g firebase-tools

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: this library is no longer supported /Users/tategraham/.npm-global/bin/firebase -> /Users/tategraham/.npm-global/lib/node_modules/firebase-tools/lib/bin/firebase.js [email protected]

I am not sure why I am getting the below message when I attempt to check that firebase-tools are installed / what version is running (firebase -V)

firebase -V

Pkg: Error reading from file.

2

There are 2 best solutions below

0
On

The message is just a warning. It's not an error, so you can ignore it. If you follow the provided link, it will describe the issue in more detail. Basically, there are libraries that is no longer maintained, and eventually the Firebase CLI will have to move away from it in the future.

0
On

in my experience the reason was that the executable firebase file was not fully downloaded, it was corrupted and no matter what command I called on it it kept on throwing Pkg: Error reading from file. Then I simply re-downloaded the file and it worked as expected.