Comments (24)
I would recommend that you generate your application in a directory outside your JHipster project. For example:
- backend (JHipster project)
- ionicui (Ionic project)
Then, when you run yo jhipster-ionic:entity course
, enter ../backend
as the path to your JHipster project.
If that doesn't work, make sure you're using v3.0.2
of this module.
from generator-jhipster-ionic.
I just updated generator-jhipster-ionic.
My directories path:
home/can/mucs (my jhipster project)
home/can/mucsapp (generated ionic project.
So paths looks like fine but still i got this error after i run "yo jhipster-ionic:entity course"
Found the .jhipster/Course.json configuration file, entity can be automatically generated!
The entity course is being updated.
Error jhipster-ionic:entity course
ERROR!
The entity configuration file could not be read!
from generator-jhipster-ionic.
Can you please run yo jhipster-ionic:entity course --debug
and paste the stack trace here?.
from generator-jhipster-ionic.
Here is the result:
Found the .jhipster/Course.json configuration file, entity can be automatically generated!
The entity course is being updated.
DEBUG! Error:
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.resolve (path.js:1167:7)
at Store.get (/home/can/.config/yarn/global/node_modules/mem-fs/index.js:34:21)
at EditionInterface.module.exports [as exists] (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/mem-fs-editor/lib/actions/exists.js:4:25)
at EditionInterface.module.exports [as readJSON] (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/mem-fs-editor/lib/actions/read-json.js:4:12)
at loadEntityJson (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/generator-jhipster/generators/generator-base.js:1735:40)
at setupconsts (/usr/lib/node_modules/generator-jhipster-ionic/generators/entity/index.js:192:26)
at Object.<anonymous> (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/yeoman-generator/lib/index.js:399:25)
at /usr/lib/node_modules/generator-jhipster-ionic/node_modules/yeoman-generator/node_modules/run-async/index.js:25:25
at /usr/lib/node_modules/generator-jhipster-ionic/node_modules/yeoman-generator/node_modules/run-async/index.js:24:19
Error jhipster-ionic:entity course --debug
Error: ERROR!
The entity configuration file could not be read!
at Environment.error (/home/can/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:157:40)
at error (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/generator-jhipster/generators/generator-base.js:1974:18)
at loadEntityJson (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/generator-jhipster/generators/generator-base.js:1738:18)
at setupconsts (/usr/lib/node_modules/generator-jhipster-ionic/generators/entity/index.js:192:26)
at Object.<anonymous> (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/yeoman-generator/lib/index.js:399:25)
at /usr/lib/node_modules/generator-jhipster-ionic/node_modules/yeoman-generator/node_modules/run-async/index.js:25:25
at /usr/lib/node_modules/generator-jhipster-ionic/node_modules/yeoman-generator/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/usr/lib/node_modules/generator-jhipster-ionic/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
from generator-jhipster-ionic.
Can you include a screenshot to show what you're entering when prompted? Also, if you could include the output from yo jhipster:info
in your JHipster project, that'd be great.
from generator-jhipster-ionic.
yo jhipster-ionic:entity course --debug
from generator-jhipster-ionic.
Can you try deleting the .yo-rc.json
file from the parent directory? I believe that's causing this issue because you're not being prompted for the path to the JHipster project.
from generator-jhipster-ionic.
Now; my entities are generated.
I regenareted my all entitites. But i got some other errors now.
(I try to regenerate User entity after i got errors but it said:
`
? Do you want to generate this entity from an existing app? Yes
? Enter the path to your app's root directory: (../mucsv2)
>> .jhipster/User.json not found in ../mucsv2/
`
from generator-jhipster-ionic.
It looks like you found a scenario in the entity generator that I didn't test yet. Maybe you're using a one-to-one relationship? Can you copy/paste the output from yo jhipster:info
in your JHipster project so I can try to reproduce?
Unfortunately, I won't be able to look at this until I'm back from vacation (January 8).
If you'd like to try and fix it in the meantime, see our contributing guide.
from generator-jhipster-ionic.
I use one-to-one relationship between Student and User.
I have to present my project next week. Do you have any idea to quickfix?
Also i check your contributing guide.
Here are the yo jhipster:info results
from generator-jhipster-ionic.
I would suggest trying to fix it manually in the generated code. Try to figure out what the relationship should look like (by looking at the code in your JHipster/Angular project) and then replicate that code with Ionic. The component classes should look similar.
from generator-jhipster-ionic.
I try to fix it.
Also my jhipster project is Angular1.
Can it cause this error?
from generator-jhipster-ionic.
Angular 1 shouldn't cause any issues, but you won't be able to look at your project's code for a hint. This module (currently) uses Angular 5 for Ionic.
from generator-jhipster-ionic.
I see.
Lastly; here is my announcement-dialog.ts file. It couldn't see user entity.(line 42) I dont understand why. Any idea?
from generator-jhipster-ionic.
from generator-jhipster-ionic.
It has user property in jhipster.
If i add "public userId?: number," into announcement.model.ts as screenshoot; is it fixed?
from generator-jhipster-ionic.
Yes, try to reference announcement.userId
instead of announcement.user
in announcement-dialog.ts
.
from generator-jhipster-ionic.
I am working on it. Thank you.
have a nice holiday
from generator-jhipster-ionic.
Did you get this figured out? If not, can you please run yo jhipster:info
in your JHipster backend and copy/paste the output here. I don't want a screenshot, I want text that I can copy and paste to see if I can reproduce/fix the problem.
from generator-jhipster-ionic.
Hi i solved it manually.
All output can't be shown here because of some reason.
So i attached it.
output.zip
from generator-jhipster-ionic.
from generator-jhipster-ionic.
Encountered this issue while generating entity as below:
bikxs@igor:~/Project/project-skeleton/output/MFSReporting/frontend$` yo jhipster-ionic:entity Report
Just found a `.yo-rc.json` in a parent directory.
Setting the project root at: /home/bikxs/Projects/project-skeleton/output/MFSReporting
Found the .jhipster/Report.json configuration file, entity can be automatically generated!
The entity Report is being updated.
Error jhipster-ionic:entity Report
ERROR!
The entity configuration file could not be read!
Got around it by using below work around
- rename the ".yi-rc.json" to ".yi-rc.json_old"
- On second try yo asks location of jhipster app and continues to generate the entity successfully.
bikxs@igor:~/Projects/project-skeleton/output/MFSReporting/frontend$ yo jhipster-ionic:entity Report
The entity Report is being created.
? Do you want to generate this entity from an existing app? Yes
? Enter the path to your app's root directory: ../
Found the .jhipster/Report.json configuration file, entity can be automatically generated!
? Do you want to update the entity? This will replace the existing files for this entity, all your custom code will be overwritten Yes, re generate the entity
create src/pages/entities/report/report.html
create src/pages/entities/report/report.model.ts
create src/pages/entities/report/report.module.ts
create src/pages/entities/report/report.provider.ts
create src/pages/entities/report/report.ts
create src/pages/entities/report/report-detail.html
create src/pages/entities/report/report-detail.module.ts
create src/pages/entities/report/report-detail.ts
create src/pages/entities/report/report-dialog.html
create src/pages/entities/report/report-dialog.module.ts
create src/pages/entities/report/report-dialog.ts
create src/pages/entities/report/index.ts
conflict src/pages/entities/entity.ts
? Overwrite src/pages/entities/entity.ts? overwrite this and all others
force src/pages/entities/entity.ts
Entity generation completed. You may have to stop/start "ionic serve" to see your new entity.
bikxs@igor:~/Projects/project-skeleton/output/MFSReporting/frontend$
from generator-jhipster-ionic.
This line indicates a configuration issue:
Just found a `.yo-rc.json` in a parent directory.
Make sure you to create your Ionic project in a directory that's at the same level (or above) your JHipster app. Don't create it inside it.
from generator-jhipster-ionic.
Closing this as it seems to be a configuration issue.
from generator-jhipster-ionic.
Related Issues (20)
- Rename cypress files extension to cy.ts to follow cypress 10 and jhipster 7.9.3 standards
- 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.