jhipster / generator-jhipster-quarkus

Quarkus blueprint for JHipster
https://www.jhipster.tech/blueprints/quarkus/
Apache License 2.0
141 stars 55 forks source link

Cannot use Blueprint on MacBookPro with M1 #217

Closed gerlicher closed 3 years ago

gerlicher commented 3 years ago

Describe the bug When starting the blueprint after answering the first question "What is the base name of your application?" it crashes with the following error:

ERROR! jhContext.setupServerOptions is not a function
TypeError: jhContext.setupServerOptions is not a function
    at new module.exports (/opt/homebrew/lib/node_modules/generator-jhipster-quarkus/generators/server/index.js:22:19)
    at Environment.instantiate (/opt/homebrew/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:794:23)
    at instantiate (/opt/homebrew/lib/node_modules/generator-jhipster-quarkus/node_modules/yeoman-generator/lib/index.js:1196:23)
    at module.exports.composeWith (/opt/homebrew/lib/node_modules/generator-jhipster-quarkus/node_modules/yeoman-generator/lib/index.js:1227:33)
    at module.exports.composeServer (/opt/homebrew/lib/node_modules/generator-jhipster-quarkus/generators/app/index.js:107:22)
    at Object.<anonymous> (/opt/homebrew/lib/node_modules/generator-jhipster-quarkus/node_modules/yeoman-generator/lib/index.js:976:25)
    at /opt/homebrew/lib/node_modules/generator-jhipster-quarkus/node_modules/run-async/index.js:49:25
    at new Promise (<anonymous>)
    at /opt/homebrew/lib/node_modules/generator-jhipster-quarkus/node_modules/run-async/index.js:26:19
    at runLoop.add.once.once (/opt/homebrew/lib/node_modules/generator-jhipster-quarkus/node_modules/yeoman-generator/lib/index.js:977:11)
Unhandled promise rejection at:
TypeError: jhContext.setupServerOptions is not a function

To Reproduce

Running on this machine:

macOS Big Sur Version 11.4

MacBook Pro (13", M1, 2020) 16 GB RAM

Installed JHipster using the npm description at: https://www.jhipster.tech/installation/

Java Version: openjdk version "11.0.9" 2020-10-20

npm version: 7.5.0

node version: v15.8.0

Steps to reproduce the behavior:

  1. npm install -g generator-jhipster
  2. jhipster --blueprints quarkus
  3. The JHipster Quarkus Version displayed is v1.1.1
  4. Answer question: What is the base name of your application?
  5. Error occurs

Expected behavior Quarkus app generation should work

Desktop (please complete the following information):

avdev4j commented 3 years ago

Hi @gerlicher, This error occurs because you are using the last JHipster version (the default one that come with the npm installation - 7.1.0) but the blueprint only support the last JHipster 6 version.

You can try to install it by using "@6.10.5" when you install JHipster npm install -g generator-jhipster@6.10.5 or even better run the JHipster quarkus command to run both the blueprint and the right JHipster version: jhipster-quarkus

Please try and let me know

gerlicher commented 3 years ago

Hi @avdev4j,

thanks, very much. This solved the issue. It worked after installing the correct (old) hipster version.

Great!