I tried creating a new blueprint using the steps provided in the jhipster website
but I face the following issue,
➜ sampleProj jhipster --blueprint testbp
INFO! Switching to JHipster installed locally in current project's node repository (node_modules)
INFO! No custom sharedOptions found within blueprint: generator-jhipster-testbp at /usr/lib/node_modules/generator-jhipster-testbp
INFO! No custom commands found within blueprint: generator-jhipster-testbp at /usr/lib/node_modules/generator-jhipster-testbp
ERROR! This is a JHipster blueprint and should be used only like jhipster --blueprint testbp
Error: This is a JHipster blueprint and should be used only like jhipster --blueprint testbp
at module.exports.error (/home/user1/code/jhipster/generator-jhipster/generators/generator-base.js:1889:11)
at new module.exports (/home/user1/code/testbp/generators/app/index.js:12:18)
at Environment.instantiate (/home/user1/code/jhipster/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:801:23)
at Environment.create (/home/user1/code/jhipster/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:773:17)
at /home/user1/code/jhipster/generator-jhipster/cli/program.js:189:58
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Promise.all (index 0)
at async JHipsterCommand._lazyBuildCommandCallBack (/home/user1/code/jhipster/generator-jhipster/cli/program.js:179:13)
at async JHipsterCommand._parseCommand (/home/user1/code/jhipster/generator-jhipster/cli/jhipster-command.js:79:7)
at async JHipsterCommand.parseAsync (/home/user1/code/jhipster/generator-jhipster/node_modules/commander/lib/command.js:916:5)
The /generators/app/index.js file has the following check,
const jhContext = (this.jhipsterContext = this.options.jhipsterContext);
if (!jhContext) {
this.error(`This is a JHipster blueprint and should be used only like ${chalk.yellow('jhipster --blueprint angularFuse')}`);
}
I couldn't figure out how/where the jhipsterContext
object is being set in the code. The only reference that I could see is in /generator-jhipster/generators/generator-base-blueprint.js
// jhipsterContext is the original generator
this.jhipsterContext = this.options.jhipsterContext;
which doesn't help me much.
Any help is greatly appreciated...