Can't use the "firebase" global word in CLI in Windows

320 views Asked by At

I'm trying to install the Firebase CLI in windows but for some reason it won't allow me to use the "firebase" command anywhere unless I'm in the path C:/Program Files/nodejs. It works fine when I'm in that path, but the whole point of using the command npm install -g firebase-tools is to allow the keyword "firebase" to be globally accessible. So what am I doing wrong? The Firebase docs don't help at all.

The error I'm getting is:

C:\Program Files>firebase -V
C:\Users\David\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\google-auto-auth\index.js:10
class Auth {
^^^^^
SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\David\AppData\Roaming\npm\node_modules\firebase-tools\lib\requireAuth.js:6:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

If i'm in C:/Program Files/nodejs then it works fine:

C:\Program Files\nodejs>firebase -V
3.11.0
0

There are 0 answers