firebase tidak bekerja

permasalahan firebase tidak bekerja ketik firebase login malah eror

output :

 syahril@syahril-PC:~$ firebase login
/usr/local/lib/node_modules/firebase-tools/node_modules/tar/lib/pack.js:32
const EOF = Buffer.alloc(1024)
                   ^

TypeError: Buffer.alloc is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/tar/lib/pack.js:32:20)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/tar/lib/create.js:6:14)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
avatar ahmad467
@ahmad467

44 Kontribusi 9 Poin

Diperbarui 6 tahun yang lalu

6 Jawaban:

Node js nya pake versi berapa? Kalau masih pakai v4.x.x coba update ke node minimal v6.11.x. Paling enak pakai NVM, jadi kalo ada konflik dengan library setelah update bisa balik ke versi sebelumnya lagi.

avatar rachmatsasongko
@rachmatsasongko

410 Kontribusi 426 Poin

Dipost 6 tahun yang lalu

node : 4.2.6 npm : 3.5.2

cara update ke versi segitu gimana gan, ane coba - coba kok malah stuck di versi yang sama ?

avatar ahmad467
@ahmad467

44 Kontribusi 9 Poin

Dipost 6 tahun yang lalu

kalo windows install ulang download yg versi terbarunya gan.

avatar sptndc
@sptndc

247 Kontribusi 59 Poin

Dipost 6 tahun yang lalu

ane ubuntu gan bukan windows. udah nyoba lewat tutor eh gak bisa tetep stuck btw kalau install lewat download appsnya gimana ?

avatar ahmad467
@ahmad467

44 Kontribusi 9 Poin

Dipost 6 tahun yang lalu

Jawaban Terpilih

Pakai NVM aja, node version manager. Caranya bisa dilihat di sini https://gist.github.com/d2s/372b5943bce17b964a79

Garis besarnya: 1. Install NVM via curl atau wget (source lihat di link) 2. Cek apa nvm sukses terinstall

command -v nvm

3. Kalau sukses cek versi node yg tersedia

nvm ls

4. Install node yg diinginkan

nvm install v6.11.3

5. Set node versi tersebut di project

nvm use v6.11.3

NPM akan otomatis terinstall sesuai dengan node version yg digunakan.

avatar rachmatsasongko
@rachmatsasongko

410 Kontribusi 426 Poin

Dipost 6 tahun yang lalu

terimakasih @rachmatsasongko udah work sekarang.

avatar ahmad467
@ahmad467

44 Kontribusi 9 Poin

Dipost 6 tahun yang lalu

Login untuk ikut Jawaban