npm ERR! asyncWrite is not a function

前端 未结 16 1858
既然无缘
既然无缘 2021-02-06 21:44

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!

相关标签:
16条回答
  • 2021-02-06 21:48

    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.

    0 讨论(0)
  • 2021-02-06 21:50

    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:

    • Starting with deleting nodesjs windows variables (system properties -> the advance tab)
    • Uninstal nodejs
    • Find the nodejs folder under program and delete it (tip: do it using cmd for faster results)
    • Enter regedit (press and hold "windows key" and letter "R" in your keyboard then type "regedit" ... Be carefull with regedit!!
    • Once regedit is open .. Edit menu then click on find
    • In the dialog box type "nodejs"
    • If it finds a key .. delete it. Press "F3" to find the next one and keep going until you delete them all.
    • In case there is one not allowing you to delete you need to enter in "save mode or with admin rights" to be able to delete those keys.
    • After that restart the computer, reinstall nodejs the newest version. It should be working fine.

    That's what I did and it worked!

    0 讨论(0)
  • 2021-02-06 21:53

    It's versions problem. npm 6.1.0node 10.2.*

    try n 10.2.1

    0 讨论(0)
  • 2021-02-06 21:54

    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 :)

    0 讨论(0)
  • 2021-02-06 21:56

    Reinstalling npm -- mentioned in n installation guide -- worked for me.

    $ curl -0 -L https://npmjs.com/install.sh | sudo sh
    
    0 讨论(0)
  • 2021-02-06 21:57

    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.

    0 讨论(0)
提交回复
热议问题