mshima / generator-jhipster-customizer

JHipster customizer blueprint
MIT License
2 stars 1 forks source link

Error with JHipster 6.9.0 #36

Closed erickjx closed 4 years ago

erickjx commented 4 years ago

Hi again the new JHipster come with new error again, thanks in advance:

info Using blueprint generator-jhipster-customizer for entity-i18n subgenerator
events.js:288
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'charAt' of undefined
    at module.exports.addContent (/usr/local/lib/node_modules/generator-jhipster-customizer/lib/needle-file.js:261:42)
    at /usr/local/lib/node_modules/generator-jhipster-customizer/lib/patcher.js:255:50
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/generator-jhipster-customizer/lib/patcher.js:235:27
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/generator-jhipster-customizer/lib/patcher.js:228:33
    at Array.forEach (<anonymous>)
    at Patcher.processPartialTemplates (/usr/local/lib/node_modules/generator-jhipster-customizer/lib/patcher.js:216:14)
    at Patcher.patch (/usr/local/lib/node_modules/generator-jhipster-customizer/lib/patcher.js:120:24)
    at module.exports.applyPatcher (/usr/local/lib/node_modules/generator-jhipster-customizer/lib/environment.js:112:33)
    at Object.<anonymous> (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:893:25)
    at /usr/local/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:49:25
    at new Promise (<anonymous>)
    at /usr/local/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:26:19
    at runLoop.add.once.once (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:894:11)
    at processImmediate (internal/timers.js:456:21)
Emitted 'error' event on  instance at:
    at Immediate.<anonymous> (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:924:20)
    at processImmediate (internal/timers.js:456:21)

the otherwiseLineIndex have -1 value.

mshima commented 4 years ago

I will take a look today.

mshima commented 4 years ago

The error is at the patch not the blueprint. Fixed in https://github.com/mshima/generator-jhipster-customizer/commit/3d60651bc1a2863016ca5d16b8192d698f50e1bb