{"action":"created","issue":{"url":"https://api.github.com/repos/hyperledger/composer/issues/4328","repository_url":"https://api.github.com/repos/hyperledger/composer","labels_url":"https://api.github.com/repos/hyperledger/composer/issues/4328/labels{/name}","comments_url":"https://api.github.com/repos/hyperledger/composer/issues/4328/comments","events_url":"https://api.github.com/repos/hyperledger/composer/issues/4328/events","html_url":"https://github.com/hyperledger/composer/issues/4328","id":349545604,"node_id":"MDU6SXNzdWUzNDk1NDU2MDQ=","number":4328,"title":"Angular app generator fails when abstract concepts are present in the CTO","user":{"login":"haardikk21","id":16539849,"node_id":"MDQ6VXNlcjE2NTM5ODQ5","avatar_url":"https://avatars2.githubusercontent.com/u/16539849?v=4","gravatar_id":"","url":"https://api.github.com/users/haardikk21","html_url":"https://github.com/haardikk21","followers_url":"https://api.github.com/users/haardikk21/followers","following_url":"https://api.github.com/users/haardikk21/following{/other_user}","gists_url":"https://api.github.com/users/haardikk21/gists{/gist_id}","starred_url":"https://api.github.com/users/haardikk21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haardikk21/subscriptions","organizations_url":"https://api.github.com/users/haardikk21/orgs","repos_url":"https://api.github.com/users/haardikk21/repos","events_url":"https://api.github.com/users/haardikk21/events{/privacy}","received_events_url":"https://api.github.com/users/haardikk21/received_events","type":"User","site_admin":false},"labels":[{"id":601100922,"node_id":"MDU6TGFiZWw2MDExMDA5MjI=","url":"https://api.github.com/repos/hyperledger/composer/labels/generator","name":"generator","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"davidkel","id":25582377,"node_id":"MDQ6VXNlcjI1NTgyMzc3","avatar_url":"https://avatars1.githubusercontent.com/u/25582377?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkel","html_url":"https://github.com/davidkel","followers_url":"https://api.github.com/users/davidkel/followers","following_url":"https://api.github.com/users/davidkel/following{/other_user}","gists_url":"https://api.github.com/users/davidkel/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkel/subscriptions","organizations_url":"https://api.github.com/users/davidkel/orgs","repos_url":"https://api.github.com/users/davidkel/repos","events_url":"https://api.github.com/users/davidkel/events{/privacy}","received_events_url":"https://api.github.com/users/davidkel/received_events","type":"User","site_admin":false},"assignees":[{"login":"davidkel","id":25582377,"node_id":"MDQ6VXNlcjI1NTgyMzc3","avatar_url":"https://avatars1.githubusercontent.com/u/25582377?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkel","html_url":"https://github.com/davidkel","followers_url":"https://api.github.com/users/davidkel/followers","following_url":"https://api.github.com/users/davidkel/following{/other_user}","gists_url":"https://api.github.com/users/davidkel/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkel/subscriptions","organizations_url":"https://api.github.com/users/davidkel/orgs","repos_url":"https://api.github.com/users/davidkel/repos","events_url":"https://api.github.com/users/davidkel/events{/privacy}","received_events_url":"https://api.github.com/users/davidkel/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-08-10T14:50:28Z","updated_at":"2018-09-28T08:51:09Z","closed_at":null,"author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n## Context\r\n<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->\r\nI am using `abstract concept`s in my code and wanted to generate an Angular app demo. I was met with `AssertionError: Trying to copy from source that does not exist ... /concept/concept.component.ts`\r\n\r\nI was able to reproduce this behaviour on a new machine with fresh installations of everything following the tutorials at \r\nhttps://hyperledger.github.io/composer/latest/installing/installing-prereqs.html\r\nhttps://hyperledger.github.io/composer/latest/installing/development-tools.html\r\nhttps://hyperledger.github.io/composer/latest/tutorials/developer-tutorial\r\n\r\n## Expected Behavior\r\n<!--- Tell us what should happen -->\r\nAn Angular app should be generated\r\n\r\n## Actual Behavior\r\n<!--- Tell us what happens instead -->\r\n`AssertionError: Trying to copy from source that does not exist ... /concept/concept.component.ts`\r\n\r\n## Possible Fix\r\n<!--- Not obligatory, but suggest a fix or reason for the bug -->\r\nMissing concept template components for the Angular app.\r\nHacky fix: Comment lines 844 to 882 in `/home/user/.nvm/versions/node/v8.11.3/lib/node_modules/generator-hyperledger-composer/generators/angular/index.js`\r\n\r\n## Steps to Reproduce\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug include code to reproduce, if relevant -->\r\nSince I run Ubuntu bionic, I had to make a small change to `prereqs-ubuntu.sh` to get my version working. Here are the `Install prerequisites` steps that I followed\r\n```\r\ncurl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh\r\n\r\nchmod u+x prereqs-ubuntu.sh\r\nnano prereqs-ubuntu.sh\r\n\r\n--Add 'bionic' in versions array, runs normally\r\n\r\n./prereqs-ubuntu.sh\r\n```\r\nAfter this, I installed the [development tools](https://hyperledger.github.io/composer/latest/installing/development-tools.html) \r\n\r\nAfter that, I generated a new business network using `yo`\r\n\r\n```\r\nyo hyperledger-composer:businessnetwork\r\n```\r\nAfter generating an EMPTY template network, I opened it in VS code and added the following lines to the empty CTO file\r\n```\r\nparticipant Person identified by participantId {\r\n    o String participantId\r\n    o Address add\r\n}\r\n\r\nabstract concept Address {\r\n    o String X\r\n    o String Y\r\n}\r\n```\r\nFollowing this, I generated the network archive and started `composer-rest-server` at `http://localhost:3000` which was running normally.\r\n\r\nFinally, `yo hyperledger-composer:angular`, connect to an existing business network, connect to an existing REST API, and I got the `AssertionError`\r\n\r\n\r\n## Existing issues\r\n<!-- Have you searched for any existing issues or are their any similar issues that you've found? -->\r\n- [x] [Stack Overflow issues](http://stackoverflow.com/tags/hyperledger-composer)\r\nI tried posting on Stackoverflow but coudn't get any answers there - https://stackoverflow.com/questions/51774093/hyperledger-composer-generator-trying-to-copy-from-a-source-that-doesnt-exist?noredirect=1#comment90523273_51774093\r\n\r\n- [x] [GitHub Issues](https://github.com/hyperledger/composer/issues)\r\nhttps://github.com/hyperledger/composer/issues/3868 suggests this was fixed earlier but mightve been overwritten\r\nhttps://github.com/hyperledger/composer/issues/3302#issuecomment-393015468\r\n- [ ] [Rocket Chat history](https://chat.hyperledger.org/channel/composer)\r\n\r\n## Context\r\n<!--- How has this bug affected you? What were you trying to accomplish? -->\r\nJust trying to use concepts in my resource types so I don't have a lot of variables going into them directly.\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* Version used: 0.20\r\n* Environment name and version (e.g. Chrome 39, node.js 5.4): node 8.11.3 , npm 6.3.0\r\n* Operating System and version (desktop or mobile): Ubuntu bionic\r\n* Link to your project: NA\r\n"},"comment":{"url":"https://api.github.com/repos/hyperledger/composer/issues/comments/425368492","html_url":"https://github.com/hyperledger/composer/issues/4328#issuecomment-425368492","issue_url":"https://api.github.com/repos/hyperledger/composer/issues/4328","id":425368492,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTM2ODQ5Mg==","user":{"login":"davidkel","id":25582377,"node_id":"MDQ6VXNlcjI1NTgyMzc3","avatar_url":"https://avatars1.githubusercontent.com/u/25582377?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkel","html_url":"https://github.com/davidkel","followers_url":"https://api.github.com/users/davidkel/followers","following_url":"https://api.github.com/users/davidkel/following{/other_user}","gists_url":"https://api.github.com/users/davidkel/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkel/subscriptions","organizations_url":"https://api.github.com/users/davidkel/orgs","repos_url":"https://api.github.com/users/davidkel/repos","events_url":"https://api.github.com/users/davidkel/events{/privacy}","received_events_url":"https://api.github.com/users/davidkel/received_events","type":"User","site_admin":false},"created_at":"2018-09-28T08:51:09Z","updated_at":"2018-09-28T08:51:09Z","author_association":"CONTRIBUTOR","body":"As per the suggestion, I have removed logic from the generator that would not work around concepts. This means that the angular generator won't support concepts but at least it won't fail to generate something when presented with a model that has concepts in."}}
{"actor":{"display_login":"davidkel"}}