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!
This is due to company network security policy
that's because, when I'm writing this answer, node 10 is not quite stable. So better stick to node 8. for that you can downgrade to 8.11.3 using
sudo n 8.11.3
then you can easily install npm modules.
I've fixed this by:
npm cache clean -f
node
to latest version: nvm install <version>
npm
to latest version: npm i -g npm
rm -rf node_modules
npm install
Solution for windows platform
Install node Again(use different installation folder like "C:\Program Files\nodejs-2")
Root cause is node and nvm installed in same installation folder.
The solution mentioned by DKebler did not work for me either, still got the same error and debug log.
I had also to downgrade.
Command Lines
sudo npm cache clean -f
sudo n 8.11.2
The following is worked in my local environment.
First install and old version node.
sudo n 8.11.3
And then update npm.
sudo npm i -g npm
Now, you update your node, everything work fine.
sudo n 10.12.0