jhipster / generator-jhipster-micronaut

Micronaut blueprint for JHipster
Apache License 2.0
100 stars 29 forks source link

"ERROR! This is a JHipster blueprint and should be used only like jhipster --blueprints micronaut" #269

Closed alina-yur closed 7 months ago

alina-yur commented 2 years ago
Overview of the issue

Hi! I'm trying to use this blueprint, but it fails when I'm trying to generate a project. the steps are below.

Reproduce the error
// verifying installation
ayurenko@ayurenko-mac jhipster-mn % npm install -g generator-jhipster-micronaut
ayurenko@ayurenko-mac jhipster-mn % npm list -g
/opt/homebrew/lib
├── generator-jhipster-micronaut@1.0.2
├── generator-jhipster-native@1.3.0
├── generator-jhipster@7.8.1
└── npm@8.15.0

// trying mhipster
ayurenko@ayurenko-mac jhipster-mn % mhipster
Local install was preferred but not found.
INFO! Using JHipster version installed globally
INFO! No custom sharedOptions found within blueprint: generator-jhipster-micronaut at /opt/homebrew/lib/node_modules/generator-jhipster-micronaut
INFO! No custom commands found within blueprint: generator-jhipster-micronaut at /opt/homebrew/lib/node_modules/generator-jhipster-micronaut
INFO! Executing jhipster:app
     info Using blueprint generator-jhipster-micronaut for app subgenerator
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, scandir '/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/generator-jhipster/lib/generators'
    at Object.readdirSync (node:fs:1450:3)
    at exports.readdir (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
    at Object.safeCall [as safe] (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
    at DirectoryReader.readNextDirectory (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
    at DirectoryReader.stream._read (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
    at Readable.read (node:internal/streams/readable:496:12)
    at readdirSync (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
    at Function.readdirSyncStat (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
    at ReaderSync.dynamicApi (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
    at ReaderSync.api (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/generator-jhipster/lib/generators'
}

Node.js v18.7.0

// trying jhipster --blueprints micronaut

ayurenko@ayurenko-mac jhipster-mn % jhipster --blueprints micronaut
INFO! Using bundled JHipster
INFO! No custom sharedOptions found within blueprint: generator-jhipster-micronaut at /opt/homebrew/lib/node_modules/generator-jhipster-micronaut
INFO! No custom commands found within blueprint: generator-jhipster-micronaut at /opt/homebrew/lib/node_modules/generator-jhipster-micronaut
ERROR! This is a JHipster blueprint and should be used only like jhipster --blueprints micronaut
Error: This is a JHipster blueprint and should be used only like jhipster --blueprints micronaut
    at module.exports.error (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/node_modules/generator-jhipster/generators/generator-base.js:1590:15)
    at new module.exports (/opt/homebrew/lib/node_modules/generator-jhipster-micronaut/generators/app/index.js:26:18)
    at Environment.instantiate (/opt/homebrew/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:801:23)
    at Environment.create (/opt/homebrew/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:773:17)
    at /opt/homebrew/lib/node_modules/generator-jhipster/cli/program.js:189:58
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at async JHipsterCommand._lazyBuildCommandCallBack (/opt/homebrew/lib/node_modules/generator-jhipster/cli/program.js:179:13)
    at async JHipsterCommand._parseCommand (/opt/homebrew/lib/node_modules/generator-jhipster/cli/jhipster-command.js:79:7)
    at async JHipsterCommand.parseAsync (/opt/homebrew/lib/node_modules/generator-jhipster/node_modules/commander/lib/command.js:916:5)
ayurenko@ayurenko-mac jhipster-mn %
Related issues
Suggest a Fix
Project configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

Using macOS/M1, Java 17/GraalVM 22.2.

Could be that I'm missing something, is that the case?

mraible commented 7 months ago

Should be working now. Please re-open if it's not.