{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5652","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5652/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5652/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5652/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/5652","id":223845304,"number":5652,"title":"Unable to generate entity named 'Subscription' in Angular 4 app","user":{"login":"jCube1980","id":6413814,"avatar_url":"https://avatars3.githubusercontent.com/u/6413814?v=3","gravatar_id":"","url":"https://api.github.com/users/jCube1980","html_url":"https://github.com/jCube1980","followers_url":"https://api.github.com/users/jCube1980/followers","following_url":"https://api.github.com/users/jCube1980/following{/other_user}","gists_url":"https://api.github.com/users/jCube1980/gists{/gist_id}","starred_url":"https://api.github.com/users/jCube1980/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jCube1980/subscriptions","organizations_url":"https://api.github.com/users/jCube1980/orgs","repos_url":"https://api.github.com/users/jCube1980/repos","events_url":"https://api.github.com/users/jCube1980/events{/privacy}","received_events_url":"https://api.github.com/users/jCube1980/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-24T14:48:15Z","updated_at":"2017-04-28T16:20:51Z","closed_at":null,"body":"##### **Overview of the issue**\r\n\r\nUnable to generate entity named 'Subscription' in Angular 4 app. \r\n\r\n##### **Motivation for or Use Case**\r\n\r\nSubscription is a common entity in many verticals. Being unable to generate a 'Subscription' could be a show-stopper in some projects.\r\n\r\n##### **Reproduce the error**\r\n\r\nCreate an Angular4 app with a basic entity named Subscription. Running `yarn install` fails with the following error.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:3:10\r\n    TS2300: Duplicate identifier 'Subscription'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:6:10\r\n    TS2300: Duplicate identifier 'Subscription'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:15:5\r\n    TS2687: All declarations of 'subscription' must have identical modifiers.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:16:13\r\n    TS2300: Duplicate identifier 'subscription'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:16:13\r\n    TS2403: Subsequent variable declarations must have the same type.  Variable 'subscription' must be of type 'Subscription', but here has type 'any'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:16:13\r\n    TS2687: All declarations of 'subscription' must have identical modifiers.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:35:13\r\n    TS90010: Type 'Subscription' is not assignable to type 'Subscription'. Two different types with this name exist, but they are unrelated.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:35:13\r\n    TS90010: Type 'Subscription' is not assignable to type 'Subscription'. Two different types with this name exist, but they are unrelated.\r\n  Property 'closed' is missing in type 'Subscription'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription-detail.component.ts:48:134\r\n    TS2339: Property 'id' does not exist on type 'Subscription'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription.component.ts:4:10\r\n    TS2300: Duplicate identifier 'Subscription'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription.component.ts:7:10\r\n    TS2300: Duplicate identifier 'Subscription'.\r\n\r\nERROR in [at-loader] ./src/main/webapp/app/entities/subscription/subscription.component.ts:50:21\r\n##### **Related issues**\r\n\r\n<!-- Has a similar issue been reported before? Please search both closed & open issues -->\r\n\r\n##### **Suggest a Fix**\r\n\r\n<!-- For bug reports, if you can't fix the bug yourself, perhaps you can point to what might be\r\n  causing the problem (line of code or commit) -->\r\n\r\n\r\n##### **JHipster Version(s)**\r\n\r\n```\r\nsubscription-test@0.0.0 E:\\projects\\jhipster\\subscription-test\r\n+-- UNMET PEER DEPENDENCY @angular/common@4.0.0\r\n+-- UNMET PEER DEPENDENCY @angular/core@4.0.0\r\n`-- generator-jhipster@4.3.0\r\n\r\n```\r\n\r\n\r\n##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**\r\n\r\n```yaml\r\n{\r\n  \"generator-jhipster\": {\r\n    \"promptValues\": {\r\n      \"packageName\": \"com.mycompany.myapp\"\r\n    },\r\n    \"jhipsterVersion\": \"4.3.0\",\r\n    \"baseName\": \"SubscriptionTest\",\r\n    \"packageName\": \"com.mycompany.myapp\",\r\n    \"packageFolder\": \"com/mycompany/myapp\",\r\n    \"serverPort\": \"8080\",\r\n    \"authenticationType\": \"session\",\r\n    \"hibernateCache\": \"no\",\r\n    \"clusteredHttpSession\": false,\r\n    \"websocket\": false,\r\n    \"databaseType\": \"sql\",\r\n    \"devDatabaseType\": \"h2Memory\",\r\n    \"prodDatabaseType\": \"postgresql\",\r\n    \"searchEngine\": false,\r\n    \"messageBroker\": false,\r\n    \"serviceDiscoveryType\": false,\r\n    \"buildTool\": \"maven\",\r\n    \"enableSocialSignIn\": false,\r\n    \"rememberMeKey\": \"0c75eb6a7a7e887ae925324073bfc6135875db74\",\r\n    \"clientFramework\": \"angular2\",\r\n    \"useSass\": false,\r\n    \"clientPackageManager\": \"yarn\",\r\n    \"applicationType\": \"monolith\",\r\n    \"testFrameworks\": [],\r\n    \"jhiPrefix\": \"jhi\",\r\n    \"enableTranslation\": false\r\n  }\r\n}\r\n```\r\n\r\n\r\n##### **Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**\r\n\r\nSubscription.json\r\n\r\n```yaml\r\n{\r\n    \"fluentMethods\": true,\r\n    \"relationships\": [],\r\n    \"fields\": [\r\n        {\r\n            \"fieldName\": \"name\",\r\n            \"fieldType\": \"String\"\r\n        }\r\n    ],\r\n    \"changelogDate\": \"20170423051400\",\r\n    \"dto\": \"mapstruct\",\r\n    \"service\": \"serviceImpl\",\r\n    \"entityTableName\": \"subscription\",\r\n    \"pagination\": \"no\"\r\n}\r\n\r\n```\r\n\r\n##### **Browsers and Operating System**\r\n\r\njava version \"1.8.0_121\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_121-b13)\r\nJava HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)\r\n\r\ngit version 2.9.0.windows.1\r\n\r\nnode: v6.10.0\r\n\r\nnpm: 3.10.10\r\n\r\nyeoman: 1.8.5\r\n\r\nyarn: 0.23.2\r\n\r\n- [X] Checking this box is mandatory (this is just to show you read everything)\r\n"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/298042460","html_url":"https://github.com/jhipster/generator-jhipster/issues/5652#issuecomment-298042460","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5652","id":298042460,"user":{"login":"gmarziou","id":361007,"avatar_url":"https://avatars3.githubusercontent.com/u/361007?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarziou","html_url":"https://github.com/gmarziou","followers_url":"https://api.github.com/users/gmarziou/followers","following_url":"https://api.github.com/users/gmarziou/following{/other_user}","gists_url":"https://api.github.com/users/gmarziou/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarziou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarziou/subscriptions","organizations_url":"https://api.github.com/users/gmarziou/orgs","repos_url":"https://api.github.com/users/gmarziou/repos","events_url":"https://api.github.com/users/gmarziou/events{/privacy}","received_events_url":"https://api.github.com/users/gmarziou/received_events","type":"User","site_admin":false},"created_at":"2017-04-28T16:20:51Z","updated_at":"2017-04-28T16:20:51Z","body":"By the way, we have same issue with entity named `Component`."}}
{"actor":{"display_login":"gmarziou"}}