2
votes

I am getting "SyntaxError: Unexpected token =" while trying to deploy on firebase. the error occures when executing firebase login command

C:\Users\Jegan\AppData\Roaming\npm\node_modules\firebase-tools\lib\utils.js:57 function logSuccess(message, type = "info") { ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (C:\Users\Jegan\AppData\Roaming\npm\node_modules\fireb
ase-tools\lib\command.js:5:13)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
2

2 Answers

0
votes

I fixed that issue by upgrading my nodejs from v4.2.6 to v8.16.0. You can run the following commands :

sudo apt-get update
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs
node --version
-1
votes

I resolved this by updating my version of Node.