npm install -g firebase-tools npm ERR! asyncWrite is not a function npm ERR! pna.nextTick is not a function
npm ERR! A complete log of this run can be found in: npm ERR!
Usually, the best way for fix it is:
rm -R /usr/local/lib/node_modules/npm and reinstall Node.js.
My recommendation is install every time Node.js from source code (yes, running make && make install). If you using Debian/Ubuntu, remember first install build-essential
$ sudo apt-get install build-essential
$ wget https://nodejs.org/dist/v10.6.0/node-v10.6.0.tar.gz
$ tar -zxvf node-v10.6.0.tar.gz
$ cd node-v10.6.0
$ make
$ sudo make install
Regards.
Solution for windows platform:
In my case the computer had win7 and by mistake installed a newer version of nodejs.
To solve this problem I did:
That's what I did and it worked!
It's versions problem. npm 6.1.0 → node 10.2.*
try n 10.2.1
Just ran into this error myself when trying to install express via npm. My simple solution was to downgrade node to the stable release. If you have "n", the node version manager, it can be done so with the command:
n stable
Hopefully this helps! I highly recommend "n" if you haven't used it before. It makes life easier :)
Reinstalling npm -- mentioned in n installation guide -- worked for me.
$ curl -0 -L https://npmjs.com/install.sh | sudo sh
You have to downgrade the node version to latest stable version i.e 8.11.2
because latest version of node is not compatible yet with all npm modules.