Code Monkey home page Code Monkey logo

Comments (9)

ramazanfirin avatar ramazanfirin commented on May 24, 2024

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.

mraible avatar mraible commented on May 24, 2024

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.

ecukalla avatar ecukalla commented on May 24, 2024

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.

ramazanfirin avatar ramazanfirin commented on May 24, 2024

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/
ramazan@ramazan-Lenovo-G50-70:
/jhipster-ionic/test2/ionic4j$ 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: ../../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.

mraible avatar mraible commented on May 24, 2024

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.

ramazanfirin avatar ramazanfirin commented on May 24, 2024

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.

mraible avatar mraible commented on May 24, 2024

from generator-jhipster-ionic.

ramazanfirin avatar ramazanfirin commented on May 24, 2024

i will very happy to contribute. please share insruction for it.

from generator-jhipster-ionic.

mraible avatar mraible commented on May 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.