Comments (9)
there are errors when creating entity from existing project
ramazan@ramazan-Lenovo-G50-70:~/jhipster-ionic/test2/ionic4j$ yo jhipster-ionic:entity blog
The entity blog is being created.
? Do you want to generate this entity from an existing app? Yes
? Enter the path to your app's root directory: ../../backend
Found the .jhipster/Blog.json configuration file, entity can be automatically generated!
Error jhipster-ionic:entity blog
ERROR!
The entity configuration file could not be read!
from generator-jhipster-ionic.
Can you try running with --debug
and see if there's more information provided? Are you able to successfully run yo jhipster:entity blog
on your backend project?
from generator-jhipster-ionic.
I'm having the same problem. Have created a monolithic app called blogapp and then the ionic4j.
Hope my environment and config helps:
➜ ionic4j git:(master) ✗ yarn --version
1.3.2
➜ ionic4j git:(master) ✗ jhipster --version
Using JHipster version installed locally in current project's node_modules
4.11.1
➜ ionic4j git:(master) ✗ yo --version
2.0.0
➜ ionic4j git:(master) ✗
➜ blogapp git:(master) ✗ cat .yo-rc.json
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany.myapp",
"nativeLanguage": "en"
},
"jhipsterVersion": "4.11.1",
"baseName": "blogapp",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8080",
"authenticationType": "jwt",
"hibernateCache": "ehcache",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSocialSignIn": false,
"enableSwaggerCodegen": false,
"jwtSecretKey": "ba085c5aa62a43cbb0dc0b396ee73b6cfc127de3",
"clientFramework": "angularX",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en"
]
}
}%
➜ blogapp git:(master) ✗ cat .jhipster/Blog.json
{
"fluentMethods": true,
"relationships": [],
"fields": [
{
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required",
"minlength"
],
"fieldValidateRulesMinlength": "3"
},
{
"fieldName": "handle",
"fieldType": "String",
"fieldValidateRules": [
"required",
"minlength"
],
"fieldValidateRulesMinlength": "2"
}
],
"changelogDate": "20171128220408",
"dto": "no",
"service": "no",
"entityTableName": "blog",
"jpaMetamodelFiltering": false,
"pagination": "no"
}
➜ blogapp git:(master) ✗
➜ ionic4j git:(master) ✗ yo jhipster-ionic:entity Blog
The entity Blog is being created.
? Do you want to generate this entity from an existing app? Yes
? Enter the path to your app's root directory: ../blogapp/
Found the .jhipster/Blog.json configuration file, entity can be automatically generated!
Error jhipster-ionic:entity Blog
ERROR!
The entity configuration file could not be read!
➜ ionic4j git:(master) ✗ yo jhipster-ionic:entity Blog --debug
The entity Blog is being created.
? Do you want to generate this entity from an existing app? Yes
? Enter the path to your app's root directory: ../blogapp/
Found the .jhipster/Blog.json configuration file, entity can be automatically generated!
DEBUG! Error:
TypeError: Cannot read property 'fromPath' of undefined
at module.exports.loadEntityJson (/Users/edmond/Documents/blog/ionic4j/node_modules/generator-jhipster/generators/generator-base.js:1725:57)
at prompt.then (/Users/edmond/Documents/blog/ionic4j/node_modules/generator-jhipster-ionic/generators/entity/prompts.js:83:18)
at <anonymous>
Error jhipster-ionic:entity Blog --debug
Error: ERROR!
The entity configuration file could not be read!
at Environment.error (/Users/edmond/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:157:40)
at module.exports.error (/Users/edmond/Documents/blog/ionic4j/node_modules/generator-jhipster/generators/generator-base.js:1964:18)
at module.exports.loadEntityJson (/Users/edmond/Documents/blog/ionic4j/node_modules/generator-jhipster/generators/generator-base.js:1728:18)
at prompt.then (/Users/edmond/Documents/blog/ionic4j/node_modules/generator-jhipster-ionic/generators/entity/prompts.js:83:18)
at <anonymous>
➜ ionic4j git:(master) ✗
from generator-jhipster-ionic.
Hi mrabble,
yo jhipster:entity blog executed successfully at backend application.
you can see debug output below
ramazan@ramazan-Lenovo-G50-70:/jhipster-ionic/test2$ cd ionic4j//jhipster-ionic/test2/ionic4j$ yo jhipster-ionic:entity blog --debug
ramazan@ramazan-Lenovo-G50-70:
The entity blog is being created.
? Do you want to generate this entity from an existing app? Yes
? Enter the path to your app's root directory: ../../backend
Found the .jhipster/Blog.json configuration file, entity can be automatically generated!
DEBUG! Error:
TypeError: Cannot read property 'fromPath' of undefined
at module.exports.loadEntityJson (/home/ramazan/jhipster-ionic/test2/ionic4j/node_modules/generator-jhipster/generators/generator-base.js:1725:56)
at prompt.then (/home/ramazan/jhipster-ionic/test2/ionic4j/node_modules/generator-jhipster-ionic/generators/entity/prompts.js:83:18)
at
Error jhipster-ionic:entity blog --debug
Error: ERROR!
The entity configuration file could not be read!
at Environment.error (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:140:40)
at module.exports.error (/home/ramazan/jhipster-ionic/test2/ionic4j/node_modules/generator-jhipster/generators/generator-base.js:1964:18)
at module.exports.loadEntityJson (/home/ramazan/jhipster-ionic/test2/ionic4j/node_modules/generator-jhipster/generators/generator-base.js:1728:18)
at prompt.then (/home/ramazan/jhipster-ionic/test2/ionic4j/node_modules/generator-jhipster-ionic/generators/entity/prompts.js:83:18)
at <anonymous>
ramazan@ramazan-Lenovo-G50-70:~/jhipster-ionic/test2/ionic4j$ c
from generator-jhipster-ionic.
This happens because the entity generator for JHipster was recently refactored. If you use JHipster 4.10.2, everything should work OK. To do this in your ionic4j app, run npm install --save [email protected]
.
from generator-jhipster-ionic.
with 4.10.2 version , it works . thanks but another problem
it generated entity from backend app for ionic app but ionic serve command dont start because of errors
i checked blog.ts and there is no variable like products...
when i change products to blogs at line 32, it works.
may be products keyword forgotten in code like static text...
you can see error logs below,
ramazan@ramazan-Lenovo-G50-70:~/jhipster-ionic/test3/ionic4j$ ionic serve
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser -
Ctrl+C to cancel
[14:28:21] watch started ...
[14:28:21] build dev started ...
[14:28:21] clean started ...
[14:28:21] clean finished in 4 ms
[14:28:21] copy started ...
[14:28:21] deeplinks started ...
[14:28:21] deeplinks finished in 99 ms
[14:28:21] transpile started ...
[14:28:25] typescript: src/pages/entities/blog/blog.ts, line: 32
Property 'products' does not exist on type 'BlogPage'.
L31: private onSuccess(data) {
L32: this.products = data;
[14:28:25] dev server running: http://localhost:8100/
[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.1.21:8100, http://172.17.0.1:8100
DevApp: ionic4j@8100 on ramazan-Lenovo-G50-70
[14:28:25] copy finished in 3.84 s
[14:28:25] watch ready in 3.92 s
from generator-jhipster-ionic.
from generator-jhipster-ionic.
i will very happy to contribute. please share insruction for it.
from generator-jhipster-ionic.
@ramazanfirin I added a contribution guide a few minutes ago. The hardest part is probably setting up your environment. Please let me know if you have any questions or suggestions for improvement!
from generator-jhipster-ionic.
Related Issues (20)
- I can't run jhipster-ionic blueprint v8.1.0
- Replace ionic-native with awesome-cordova-plugins. HOT 4
- Update ionic-appauth to released version. HOT 2
- Investigate to reuse main generator components
- Error when creating entity in frontend HOT 3
- Error getting when try to create entity in front end HOT 4
- Getting error when try to create new entity HOT 2
- Error when generating the code if the jdl file has an entity with no fields HOT 5
- Conflict when an entity has two image fields HOT 5
- JWT Token issue HOT 2
- Release 8.1.0 HOT 2
- jhipster server and jhipster-ionic App Continuous Integration HOT 3
- OneToOne Relationship with jdl doesn't work HOT 8
- CORS Error HOT 12
- Are you sure you added CORS information in the correct part of `application.yml`? You might look at the [`application-dev.yml` template](https://github.com/jhipster/generator-jhipster/blob/main/generators/server/templates/src/main/resources/config/application-dev.yml.ejs#L292) to see where it should be.
- Oauth2 Social Sign-In In Android App
- Migrate to JHipster v8 HOT 5
- Release new version with Node 18 support HOT 3
- npx ionic capacitor add ios. is throwing an issue below HOT 1
- Update to angular 17 and update implementation to new angular standards. HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-jhipster-ionic.