Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity name duplicated into app.module.ts imports every time entity updated #219

Closed
pwujek opened this issue Apr 12, 2021 · 5 comments · Fixed by #222
Closed

Entity name duplicated into app.module.ts imports every time entity updated #219

pwujek opened this issue Apr 12, 2021 · 5 comments · Fixed by #222
Labels
bug Something isn't working good first issue Good for newcomers more information is needed More information are required to understand issue

Comments

@pwujek
Copy link

pwujek commented Apr 12, 2021

Describe the bug
Entity name duplicated into app.module.ts imports every time entity updated, the name can appear several times.

To Reproduce

  1. nHipster entity myEntity -> regenerate
  2. look at server/src/app.module.ts

Expected behavior
Existing entity names should not be duplicated in import.

Screenshots
image

Desktop:

  • OS: Ubuntu 20.10
  • nHipster 6.8.0

NHipster configuration
nHipster info

$ nhipster info
INFO! Using JHipster version installed locally in current project's node_modules
INFO! No custom sharedOptions found within blueprint: generator-jhipster-nodejs at /home/paul/Desktop/aaa/project/events/node_modules/generator-jhipster-nodejs
INFO! No custom commands found within blueprint: generator-jhipster-nodejs at /home/paul/Desktop/aaa/project/events/node_modules/generator-jhipster-nodejs
INFO! Executing jhipster:info
INFO! Options: blueprints: nodejs, from-cli: true
(node:37377) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:37377) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:37377) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
Welcome to the JHipster Information Sub-Generator

##### **JHipster Version(s)**

[email protected] /home/paul/Desktop/aaa/project/events
├─┬ [email protected]
│ └── [email protected] deduped
└── [email protected]



##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**


<details>
<summary>.yo-rc.json file</summary>
<pre>
{
  "generator-jhipster": {
    "jhipsterVersion": "6.8.0",
    "applicationType": "monolith",
    "baseName": "events",
    "packageName": "com.jhipster.node",
    "packageFolder": "com/jhipster/node",
    "serverPort": "8081",
    "authenticationType": "jwt",
    "cacheProvider": "no",
    "enableHibernateCache": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "sqlite",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "embeddableLaunchScript": false,
    "useSass": true,
    "clientPackageManager": "npm",
    "clientFramework": "react",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1616020807324,
    "testFrameworks": ["protractor"],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [
      {
        "name": "generator-jhipster-nodejs",
        "version": "1.4.0"
      }
    ],
    "enableTranslation": false,
    "blueprints": [
      {
        "name": "generator-jhipster-nodejs",
        "version": "1.4.0"
      }
    ],
    "jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl"
  }
}

</pre>
</details>


##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>
entity Evt {
  evtName String required unique,
  evtNameTxt String,
  evtDes TextBlob required,
  evtBeginDate ZonedDateTime required,
  evtEndDate ZonedDateTime required,
  programAltCd String,
  statusStt String,
  locationCity String,
  locationStateCd String,
  city String,
  stateCd String,
  majorCat String,
  minorCat String,
  attendeeMaxQty String,
  companyCd String,
  earlyRegistrationDate LocalDate required,
  lastRegistrationDate LocalDate required,
  onWebFlg Boolean,
  regOnlineFlg Boolean
}
entity Timeslot {
  timeslotDate LocalDate required,
  timeslotStart ZonedDateTime required,
  timeslotEnd ZonedDateTime required,
  timeZone String required
}
entity Session {
  sessionType String required,
  sessionNumber String required,
  sessionName String required,
  sessionDescriptionText String required,
  sessionZoomUrl String,
  sessionCpeType String,
  sessionCpeHours Float,
  sessionFormat String required
}
entity Venue {
  venueName String required,
  venueAddress1 String,
  venueAddress2 String,
  venueCity String required,
  venueState String,
  venuePhone String
}
entity Room {
  roomName String required
}
entity Presentation {
  presTitle String required,
  presDescription String required,
  presBlob String,
  displayPresenters Boolean
}
entity Presenter
entity PresenterType {
  name String required,
  value String required
}
entity Document {
  fileName String,
  fileType String,
  fileUrl String,
  fileShortDescription String,
  fileLongDescription String
}
entity DocumentLink {
  linkEntity String required
}
entity VideoSource {
  videoUrl String,
  videoTitle String required,
  videoDescription String
}
entity UserInfo {
  userAffiliation String,
  userTitles String
}
entity EvtFeature {
  name String required,
  description String required,
  value String,
  type String required
}
entity SessionFeature {
  name String required,
  description String required,
  value String,
  type String required
}
entity RoomFeature {
  name String required,
  description String required,
  value String,
  type String required
}
entity VenueFeature {
  name String required,
  description String required,
  value String,
  type String required
}
entity PresentationFeature {
  name String required,
  description String required,
  value String,
  type String required
}
entity Announcement {
  type String required,
  body String required,
  sendAt ZonedDateTime,
  wasSent Boolean,
  isImmediate Boolean,
  isImmediateConfirmed Boolean
}
relationship OneToOne {
  UserInfo{user(login) required} to User
}
relationship OneToMany {
  Timeslot{session} to Session{timeslot(timeslotStart) required},
  Evt{session} to Session{evt(sessionName) required},
  Venue{room} to Room{venue(venueName) required},
  Presentation{presenter} to Presenter{presentation(presTitle) required},
  Session{sessionFeature} to SessionFeature{session(sessionName) required},
  Room{roomFeature} to RoomFeature{room(roomName) required},
  Venue{venueFeature} to VenueFeature{venue(venueName) required},
  Presentation{presentationFeature} to PresentationFeature{presentation(presTitle) required},
  Evt{announcement} to Announcement{evt(sessionName) required},
  Session{announcement} to Announcement{session(sessionName) required}
}
relationship ManyToOne {
  Evt{venue(venueName) required} to Venue,
  Timeslot{evt(sessionName) required} to Evt,
  Session{room(roomName) required} to Room,
  Presentation{session(sessionName) required} to Session,
  Presenter{user(login) required} to User,
  Presenter{presenterType(name) required} to PresenterType,
  EvtFeature{evt(sessionName) required} to Evt
}

paginate Evt, Timeslot, Session, Venue, Room, Presentation, Presenter, Document, DocumentLink, VideoSource, UserInfo, EvtFeature, SessionFeature, RoomFeature, VenueFeature, PresentationFeature, Announcement with infinite-scroll

</pre>
</details>


##### **Environment and Tools**

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.10)
OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.10, mixed mode, sharing)

git version 2.27.0

node: v14.16.0

npm: 7.6.3

yeoman: 3.1.1

yarn: 1.22.5

Docker version 19.03.13, build 4484c46d9d

docker-compose version 1.25.5, build unknown

.y-rc.json

{
  "generator-jhipster": {
    "jhipsterVersion": "6.8.0",
    "applicationType": "monolith",
    "baseName": "events",
    "packageName": "com.jhipster.node",
    "packageFolder": "com/jhipster/node",
    "serverPort": "8081",
    "authenticationType": "jwt",
    "cacheProvider": "no",
    "enableHibernateCache": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "sqlite",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "embeddableLaunchScript": false,
    "useSass": true,
    "clientPackageManager": "npm",
    "clientFramework": "react",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1616020807324,
    "testFrameworks": ["protractor"],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [
      {
        "name": "generator-jhipster-nodejs",
        "version": "1.4.0"
      }
    ],
    "enableTranslation": false,
    "blueprints": [
      {
        "name": "generator-jhipster-nodejs",
        "version": "1.4.0"
      }
    ],
    "jwtSecretKey": "MTdlM2VjNjc3MDAyZDAwZmExMDFhODM0ZjU0MzkwZjQ1MjQxYTFhMDkyZmRmOTdiMWFkYWUyM2ZlMDk5MjAxMzg4M2U4ZmVhMmYyODYxMGJhN2Q1MTkzZThjYWNhYmViMDFhMzcxZjMzY2Q0N2NkMGZiNGNmYmNmMGZmNDMyMjY="
  }
}
@ghost ghost self-assigned this Apr 13, 2021
@ghost
Copy link

ghost commented Apr 13, 2021

Hi @pwujek , thanks for the issue!
Have you used the last 2.0.0-beta.1 nhipster version?

@ghost ghost added good first issue Good for newcomers more information is needed More information are required to understand issue labels Apr 13, 2021
@pwujek
Copy link
Author

pwujek commented Apr 13, 2021

I have not tried the beta, I'll give it a shot and post any issues I discover.

@ghost
Copy link

ghost commented Apr 13, 2021

Try with 2.0.0-beta.1 version, and check if there is the same issue.

@ghost ghost added the bug Something isn't working label Apr 13, 2021
@pwujek
Copy link
Author

pwujek commented Apr 13, 2021

Hi @pwujek , thanks for the issue!
Have you used the last 2.0.0-beta.1 nhipster version?

Issue is resolved in the beta.

@ghost ghost linked a pull request Apr 13, 2021 that will close this issue
@ghost ghost removed a link to a pull request Apr 13, 2021
@ghost ghost linked a pull request Apr 13, 2021 that will close this issue
@ghost
Copy link

ghost commented Apr 13, 2021

No, I have found the same error, so the PR could fix it

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers more information is needed More information are required to understand issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant