简体   繁体   English

尝试使用npm start启动Hyperledger Composer应用程序会出现“找不到名称%participant%”错误

[英]Attempt to launch Hyperledger Composer app using npm start gives “Cannot find name %participant%” error

I'm following the Developer Tutorial for creating a Hyperledger Composer solution over at https://hyperledger.github.io/ , and I got all the way to the end without a hitch until running into this wall. 我正在通过https://hyperledger.github.io/遵循开发人员教程来创建Hyperledger Composer解决方案 ,并且一直进行到最后,直到碰到这堵墙。

For the final step of running the app and webpacking it with Angular ( npm start ), I'm running into the following Cannot find name errors, triggered by inline.bundle.js . 对于运行应用程序并将其与Angular( npm start )进行网络打包的最后一步,我遇到了以下由inline.bundle.js触发的Cannot find name错误。

在此处输入图片说明

After digging around, I discovered that all these offending variables had something in common — they were defined in their respective .cto files using the import command. 深入研究之后,我发现所有这些令人讨厌的变量都有一些共同点-使用import命令在各自的.cto文件中定义它们。 For example, this is what models/manufacturer.cto looks like in the Business Network Definition: 例如,这是model / manufacturer.cto在业务网络定义中的外观:

在此处输入图片说明

This is what models/regulator.to looks like: 这是model / regulator.to的样子:

在此处输入图片说明

The same pattern holds true for all the errors, it cannot find names which are defined in the Business Network using import . 相同的模式适用于所有错误,它找不到使用import在业务网络中定义的名称。

I suspected this had something to do with the namespace, but whether I tell composer to compile the app using namespaces or by never using namespaces makes no difference, I get the same errors each time. 我怀疑这与名称空间有关,但是无论是告诉作曲者使用名称空间还是不使用名称空间来编译应用程序都没有区别,每次都会遇到相同的错误。

I'm new to this so any insight would be much appreciated. 我对此并不陌生,因此不胜感激。 Thanks! 谢谢!

Upgrading to v0.12.0 appears to have solved the issue. 升级到v0.12.0似乎已解决了该问题。 Yeoman now compiles the web app without any errors. Yeoman现在可以正确编译Web应用程序。 Looks like the bug had already been reported a month ago here , but was just closed a few days ago. 该bug似乎已在一个月前在此报告过,但几天前才被关闭。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM