contribution-jhipster-uga / generator-jhipster-backup-database

JHipster module, this module allows you to generate .yml files allowing you to make regular backups of your production database. For the moment the following databases are supported : MYSQL, POSTGRESQL, MONGODB, MARIADB.
MIT License
3 stars 4 forks source link

Error in JHipster 6.1.0 #1

Open erickjx opened 5 years ago

erickjx commented 5 years ago

Hi, i have error with Hipster 6.1.0:

yo jhipster-database-backup
events.js:174
      throw er; // Unhandled 'error' event
      ^

TypeError: this.getJhipsterAppConfig is not a function
    at module.exports.readConfig (/usr/lib/node_modules/generator-jhipster-database-backup/generators/app/index.js:17:47)
    at Object.<anonymous> (/usr/lib/node_modules/generator-jhipster-database-backup/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:424:27)
    at /usr/lib/node_modules/generator-jhipster-database-backup/node_modules/run-async/index.js:25:25
    at new Promise (<anonymous>)
    at /usr/lib/node_modules/generator-jhipster-database-backup/node_modules/run-async/index.js:24:19
    at self.env.runLoop.add.completed (/usr/lib/node_modules/generator-jhipster-database-backup/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:425:13)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
Emitted 'error' event at:
    at Immediate.setImmediate (/usr/lib/node_modules/generator-jhipster-database-backup/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:433:22)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

I fix change in generator-jhipster-database-backup/generators/app/index.js in line 17 this.getJhipsterAppConfig -> this.getAllJhipsterConfig

 16             readConfig() {
 17                 this.jhipsterAppConfig = this.getAllJhipsterConfig();
 18                 if (!this.jhipsterAppConfig) {
 19                     this.error('Can\'t read .yo-rc.json');
 20                 }
 21             },
thawkins commented 5 years ago

Geting the same error