Error while executing the “npm install” command in ubuntu 18.04 LTS

倾然丶 夕夏残阳落幕 提交于 2019-12-11 17:33:01

问题


I have been trying to install and run my first hyperledger fabric application (http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html) but have been encountering the following issue everytime I run the "npm install" command. Please let me know what is the solution to resolve this issue.

The error is as follows:

I have tried deleted .node-gyp, .npmrc folder from $HOME and restarting the computer.Nothing helped.


回答1:


Faced a similar issue in Centos 7 and resolved by installing the development tools..

To compile and install native addons from npm you need to install the development tools.

Running the following commands will resolve your issue;

sudo apt install gcc g++ make

npm install




回答2:


node-gyp has dependency on ms visual basic redistributable. You have to check that relation and install. Hope you have done that.




回答3:


Change the python version to 2.7. Then run

npm install -g --production windows-build-tools 

as administrator.



来源:https://stackoverflow.com/questions/54379872/error-while-executing-the-npm-install-command-in-ubuntu-18-04-lts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!