I am developing application in microservices architecture with JHipster Registry, UAA, gateway, etc.
I have generated application components with JHipster generator from command line.
I had an entity generated with readOnly property set to false, let's call it Message. I ran entity generation also in the gateway application's folder for the webapp (I am using React). Later I changed the readOnly property to true, re ran generation for the microservice and also for the gateway. At this point I got compile errors stating that createEntity, deleteEntity, updateEntity is missing from the reducer, see below:
ERROR Failed to compile with 6 errors
error in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-delete-dialog.tsx
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-delete-dialog.tsx(10,21):
TS2614: Module '"./message.reducer"' has no exported member 'deleteEntity'. Did you mean to use 'import deleteEntity from "./message.reducer"' instead?
error in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx(10,21):
TS2614: Module '"./message.reducer"' has no exported member 'updateEntity'. Did you mean to use 'import updateEntity from "./message.reducer"' instead?
error in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx(10,35):
TS2614: Module '"./message.reducer"' has no exported member 'createEntity'. Did you mean to use 'import createEntity from "./message.reducer"' instead?
1176 modules
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-delete-dialog.tsx
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-delete-dialog.tsx(10,21):
TS2614: Module '"./message.reducer"' has no exported member 'deleteEntity'. Did you mean to use 'import deleteEntity from "./message.reducer"' instead?
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx(10,21):
TS2614: Module '"./message.reducer"' has no exported member 'updateEntity'. Did you mean to use 'import updateEntity from "./message.reducer"' instead?
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx
ERROR in D:/_development/todo-app/gateway/src/main/webapp/app/entities/eventuate/message/message-update.tsx(10,35):
TS2614: Module '"./message.reducer"' has no exported member 'createEntity'. Did you mean to use 'import createEntity from "./message.reducer"' instead?
##### **Motivation for or Use Case**
Gateway webapp won't compile without manual delete of files from the source
##### **Reproduce the error**
1. Create entity with readOnly set to false
2. Run entity generation for the gateway
3. Change readOnly to true, regenerate in microservice
4. Run regenerate for the gateway
##### **Related issues**
##### **Suggest a Fix**
Delete whole folder for the entity before regeneration in the gateway
##### **JHipster Version(s)**
6.10.1
##### **JHipster configuration**
##### **JHipster Version(s)**
[email protected] D:\_development\todo-app\gateway
`-- [email protected]
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
{
"generator-jhipster": {
"promptValues": {
"packageName": "hu.evopro.todo.gateway",
"microservicePath": "..\\eventuate"
},
"jhipsterVersion": "6.10.1",
"applicationType": "gateway",
"baseName": "TodoGateway",
"packageName": "hu.evopro.todo.gateway",
"packageFolder": "hu/evopro/todo/gateway",
"serverPort": "8080",
"authenticationType": "uaa",
"uaaBaseName": "TodoUAA",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"embeddableLaunchScript": false,
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "react",
"clientTheme": "journal",
"clientThemeVariant": "primary",
"creationTimestamp": 1598519646183,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": false,
"blueprints": []
}
}
entityName.json files generated in the .jhipster directory
JDL entity definitions
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
git version 2.24.1.windows.2
node: v12.17.0
npm: 6.14.4
yeoman: 3.1.1
yarn: 1.21.1
Docker version 19.03.13-beta2, build ff3fbc9d55
docker-compose version 1.27.0, build 980ec85b
entityName.json files generated in the .jhipster directoryMessage.json
{
"fluentMethods": true,
"clientRootFolder": "eventuate",
"relationships": [],
"fields": [
{
"fieldName": "id",
"fieldType": "String"
},
{
"fieldName": "destination",
"fieldType": "String"
},
{
"fieldName": "headers",
"fieldType": "String"
},
{
"fieldName": "payload",
"fieldType": "String"
},
{
"fieldName": "published",
"fieldType": "Integer"
},
{
"fieldName": "creationTime",
"fieldType": "Integer"
}
],
"changelogDate": "20200829115318",
"dto": "no",
"searchEngine": false,
"service": "no",
"entityTableName": "message",
"databaseType": "sql",
"readOnly": true,
"jpaMetamodelFiltering": false,
"pagination": "no",
"microserviceName": "eventuate"
}
Windows 10 1809
Firefox 80.0.1
A 1st answer after reading your ticket. I didn't test it yet.
I think the behavior is normal:
It's exactly the same workflow:
We don鈥檛 support changing configs now.
You need to recreate.
The only use case that removes file now is a deleted file from templates or renamed file.
Most helpful comment
A 1st answer after reading your ticket. I didn't test it yet.
I think the behavior is normal:
It's exactly the same workflow: