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!
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.