jhipster / generator-jhipster-native

Apache License 2.0
43 stars 9 forks source link

Error during init project #79

Closed igortregub closed 1 year ago

igortregub commented 1 year ago

Hello, I tried to generate microservice project using jhipster-native and got error

INFO! No custom sharedOptions found within blueprint: generator-jhipster-native at /opt/homebrew/lib/node_modules/generator-jhipster-native
INFO! No custom commands found within blueprint: generator-jhipster-native at /opt/homebrew/lib/node_modules/generator-jhipster-native

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.9.3

===================== JHipster Native =====================

     info Using blueprint generator-jhipster-native for app subgenerator
Application files will be generated in folder: /Users/igortregub/Development/test-native
 _______________________________________________________________________________________________________________

  Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
  If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
 _______________________________________________________________________________________________________________

     info Using blueprint generator-jhipster-native for server subgenerator
This is an existing project, using the configuration from your .yo-rc.json file
to re-generate the project...

KeyStore '/Users/igortregub/Development/test-native/src/main/resources/config/tls//keystore.p12' already exists. Leaving unchanged.

✖ An error occured while running jhipster-native:server#logoutResource
ERROR! /Users/igortregub/Development/test-native/src/main/java/com/example/web/rest/LogoutResource.java doesn't exist
Error: /Users/igortregub/Development/test-native/src/main/java/com/example/web/rest/LogoutResource.java doesn't exist
    at module.exports [as read] (/opt/homebrew/lib/node_modules/generator-jhipster-native/node_modules/mem-fs-editor/lib/actions/read.js:12:11)
    at fs.readDestination (/opt/homebrew/lib/node_modules/generator-jhipster-native/node_modules/yeoman-generator/lib/actions/fs.js:85:18)
    at default.editFile (file:///opt/homebrew/lib/node_modules/generator-jhipster-native/generators/server/generator.mjs:535:24)
    at default.logoutResource (file:///opt/homebrew/lib/node_modules/generator-jhipster-native/generators/server/generator.mjs:361:14)
    at Object.<anonymous> (/opt/homebrew/lib/node_modules/generator-jhipster-native/node_modules/yeoman-generator/lib/index.js:1091:23)
    at /opt/homebrew/lib/node_modules/generator-jhipster-native/node_modules/run-async/index.js:49:25
    at new Promise (<anonymous>)
    at /opt/homebrew/lib/node_modules/generator-jhipster-native/node_modules/run-async/index.js:26:19
    at /opt/homebrew/lib/node_modules/generator-jhipster-native/node_modules/yeoman-generator/lib/index.js:1092:9
    at new Promise (<anonymous>)
➜  test-native git:(main)

Application Type: microservice Authentication Type: oauth2 Build Tool: maven Cache Provider: redis Database: mariadb Dev Database: h2Disk jhipster: 7.9.3 Reactive: false Service Discovery: consul OS: macOS Ventura 13.0 npm: 8.19.3 node: v18.13.0

mraible commented 1 year ago

I don't think we've tested this blueprint with microservices, only monoliths. If you use the main branch of JHipster, you can use Spring Boot 3. Spring Boot 3 doesn't need Spring Native. Here's a video that shows how:

https://www.youtube.com/watch?v=0UFWJ3JGZa0

And a Gist with the commands:

https://gist.github.com/mraible/1e9b8b755ad6ea7c3dcd86fc860a6d56

igortregub commented 1 year ago

Thank you, I will try this.

atomfrede commented 1 year ago

I don't think we've tested this blueprint with microservices, only monoliths. If you use the main branch of JHipster, you can use Spring Boot 3. Spring Boot 3 doesn't need Spring Native. Here's a video that shows how:

https://www.youtube.com/watch?v=0UFWJ3JGZa0

And a Gist with the commands:

https://gist.github.com/mraible/1e9b8b755ad6ea7c3dcd86fc860a6d56

Yes, microservices are not supported with this blueprint or at least not tested.

mraible commented 1 year ago

Closing because there's been lots of changes recently. Please reopen if issues remain after the next release.

bakoorjakkals commented 1 year ago

I'm still getting the error when trying to create a microservice using version 1.3.2.