npm install web3安装失败:undefined ls-remote

时间:2018-11-11 09:28:44

标签: node.js install web3

安装环境

win7 64位

I:\ nodejs>节点-v

v10.13.0

I:\ nodejs> npm -v

6.4.1

I:\ nodejs> npm安装web3

npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz@1.0.7: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your appli
npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2018-11-11T09_18_45_834Z-debug.log

我从未遇到过这样的问题,也没有在Google上找到任何线索。

预先感谢

4 个答案:

答案 0 :(得分:1)

npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.

这些行告诉您问题是缺少的gitHere是您的解决方案。

答案 1 :(得分:0)

我这样解决了:

step1 npm install --global --production Windows-build-tools

step2 npm install --global node-gyp

答案 2 :(得分:0)

只需安装git,您的问题就会得到解决。 npm尝试使用git

下载

答案 3 :(得分:0)

如果您已安装git,则只需在命令提示符下键入 <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource2" DataKeyNames="ID" InsertItemPosition="LastItem"> <EmptyDataTemplate> <table runat="server" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;"> <tr> <td>Non è stato restituito alcun dato.</td> </tr> </table> </EmptyDataTemplate> <InsertItemTemplate> <tr style=""> <td> <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Inserisci" OnClick="InsertButton_Click" Width="140px" /> </td> </tr> </InsertItemTemplate> <ItemTemplate> <tr style="background-color: #FFFBD6; color: #333333;"> <td> <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="Elimina" OnClientClick="return confirm ('Confermi la cancellazione del record?');" /> <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="Modifica" ID_Persona='<%# Eval("ID") %>' OnClick="EditButton_Click" /> </td> <td> <asp:Label ID="NomeLabel" runat="server" Text='<%# Eval("Nome") %>' /> </td> <td> <asp:Label ID="CognomeLabel" runat="server" Text='<%# Eval("Cognome") %>' /> </td> <td> <asp:Label ID="CodiceFiscaleLabel" runat="server" Text='<%# Eval("CodiceFiscale") %>' /> </td> <td> <asp:Label ID="EmailLabel" runat="server" Text='<%# Eval("Email") %>' /> </td> <td> <asp:Label ID="RagioneSocialeLabel" runat="server" Text='<%# Eval("RagioneSociale") %>' /> </td> <td> <asp:Label ID="PivaLabel" runat="server" Text='<%# Eval("Piva") %>' /> </td> </tr> </ItemTemplate> <LayoutTemplate> <table runat="server"> <tr runat="server"> <td runat="server"> <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; <tr runat="server" style="background-color: #FFFBD6; color:#333333;"> <th runat="server"></th> <th runat="server">Nome</th> <th runat="server">Cognome</th> <th runat="server">CodiceFiscale</th> <th runat="server">Email</th> <th runat="server">RagioneSociale</th> <th runat="server">Piva</th> </tr> <tr id="itemPlaceholder" runat="server"> </tr> </table> </asp:ListView> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:dbConnection %>" SelectCommand="SELECT [Nome], [Cognome], [Email], [CodiceFiscale], [RagioneSociale], [Piva], [ID] FROM [Persona] WHERE ([Tipocliente] = @Tipocliente)" DeleteCommand="DELETE FROM [Persona] WHERE [ID] = @original_ID" InsertCommand="INSERT INTO [Persona] ([Nome], [Cognome], [Email], [CodiceFiscale], [RagioneSociale], [Piva]) VALUES (@Nome, @Cognome, @Email, @CodiceFiscale, @RagioneSociale, @Piva)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Persona] SET [Nome] = @Nome, [Cognome] = @Cognome, [Email] = @Email, [CodiceFiscale] = @CodiceFiscale, [RagioneSociale] = @RagioneSociale, [Piva] = @Piva WHERE [ID] = @original_ID"> <DeleteParameters> <asp:Parameter Name="original_ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Nome" Type="String" /> <asp:Parameter Name="Cognome" Type="String" /> <asp:Parameter Name="Email" Type="String" /> <asp:Parameter Name="CodiceFiscale" Type="String" /> <asp:Parameter Name="RagioneSociale" Type="String" /> <asp:Parameter Name="Piva" Type="String" /> </InsertParameters> <SelectParameters> <asp:ControlParameter ControlID="DropDownList1" Name="Tipocliente" PropertyName="SelectedValue" Type="Int32" DefaultValue="1" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="Nome" Type="String" /> <asp:Parameter Name="Cognome" Type="String" /> <asp:Parameter Name="Email" Type="String" /> <asp:Parameter Name="CodiceFiscale" Type="String" /> <asp:Parameter Name="RagioneSociale" Type="String" /> <asp:Parameter Name="Piva" Type="String" /> <asp:Parameter Name="original_ID" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource> ,即可确保它可以全局访问。

如果看不到git命令列表,则必须在Windows中的git部分下配置GIT路径。

Check this for more detail