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

家住魔仙堡 提交于 2019-12-24 19:17:51

问题


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.

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.

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. For example, this is what models/manufacturer.cto looks like in the Business Network Definition:

This is what models/regulator.to looks like:

The same pattern holds true for all the errors, it cannot find names which are defined in the Business Network using 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!


回答1:


Upgrading to v0.12.0 appears to have solved the issue. Yeoman now compiles the web app without any errors. Looks like the bug had already been reported a month ago here, but was just closed a few days ago.



来源:https://stackoverflow.com/questions/45951060/attempt-to-launch-hyperledger-composer-app-using-npm-start-gives-cannot-find-na

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