NodeJS npm install pg failed

前端 未结 3 1933
离开以前
离开以前 2020-12-31 21:28

Im trying to npm install pg on my ubuntu virtual machine and i got error:

> pg@1.1.0 install /usr/local/lib/node_modules/core/node_modules/pg
> node-gy         


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-31 22:22

    Try running the following commands and then run npm install, this will take the node's default node-gyp module. (No need to have multiple as node package already provides that)

    Updating the node & NPM

    sudo npm cache clean -f
    sudo npm install -g n
    sudo n 4.4.5
    sudo npm install npm -g
    

    Removing additional Node-gyp module

    sudo npm uninstall node-gyp -g
    sudo npm uninstall node-gyp
    

提交回复
热议问题