我正在尝试使用其工作台和其他资源从azure启动区块链。我已经安装了所有前提条件,并且在安装区块链服务以创建财团方面没有问题,也没有在构建项目时遇到问题,在vs中使用“ Azure Blockchain:Build Contracts”命令构建智能合约时遇到了问题代码终端,下面是给定的错误。
VS代码告诉我要安装.NET CLI,稍后,我可以告诉别人如何检查我的项目是否已完全构建。
我尝试使用npm安装软件包,但是我也有错误。我不知道是否在不安装松露作为先决条件的情况下npm确实安装了构建天蓝色固体项目所需的所有文件,因为我遇到了问题用npm安装松露
Azure Blockchain: Build Contracts
这是我收到的错误消息。
Get version for required apps
[Execute command]
Working dir: c:\BlockChains\CodeFunDo
Running command
npx truffle compile
[Execute command] Error: Cannot find module 'truffle-hdwallet-provider'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (c:\BlockChains\CodeFunDo\truffle-config.js:1:26)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Function.Config.load (C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-config\index.js:386:1)
at Function.Config.detect (C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-config\index.js:375:1)
at Object.run (C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-core\lib\commands\compile.js:56:1)
at Command.run (C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-core\lib\command.js:140:1)
at Object.<anonymous> (C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-core\cli.js:52:1)
at __webpack_require__ (C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\webpack:\webpack\bootstrap 4290d8a3f36a864c3a92:19:1)
at C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\webpack:\webpack\bootstrap 4290d8a3f36a864c3a92:65:1
at Object.<anonymous> (C:\Users\KAUSTUBH JHA\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:71:10)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at findNodeScript.then.existing (C:\Program Files\nodejs\node_modules\npm\node_modules\libnpx\index.js:268:14)
[Execute command] Truffle v5.0.26 (core: 5.0.26)
[Execute command] Node v10.16.0
[Execute command] Finished running command
答案 0 :(得分:0)
之所以发生这种情况,是因为您缺少节点程序包。 我也遇到了同样的问题。
解决方案-
npm install -g hdwallet-provider
在重新启动VS Code之后,尝试构建,它将构建...