contribution-jhipster-uga / generator-jhipster-chatbot-rasa

A JHipster genator that integrates an interface to be use with bot using the Rasa stack.
MIT License
1 stars 1 forks source link

compatiblity with new jhipster version #1

Open Guangrun opened 4 years ago

Guangrun commented 4 years ago

It is not compatible with jhipster version 6.5.1

Error: events.js:187 throw er; // Unhandled 'error' event ^

TypeError: this.getJhipsterAppConfig is not a function at module.exports.readConfig (C:\Users\USER\AppData\Roaming\npm\node_modules\generator-jhipster-chatbot-rasa\generators\app\index.js:17:47)

BlankRain commented 4 years ago

TypeError: this.getJhipsterAppConfig is not a function

BlankRain commented 4 years ago

@Guangrun do it yourself //Adding the component in app.tsx jhipsterUtils.replaceContent({ file: ${webappDir}app/app.tsx, pattern: <Footer />, content: <Footer /> <Widget interval={2000} initPayload={'/get_started'} socketUrl={'http://localhost:5002'} socketPath={'/socket.io/'} title={'JHipster Chatbot'} inputTextFieldHint={'Type a message...'} connectingText={'Waiting for server...'} embedded={false} hideWhenNotConnected params={{ images: { dims: { width: 300, height: 200 } }, storage: 'local' }} />, regex: false }, this);

        //Adding import for Widget module
        jhipsterUtils.replaceContent({
            file: `${webappDir}app/app.tsx`,
            pattern: `import React from 'react';`,
            content: `import React from 'react';\nimport { Widget } from 'rasa-webchat';`,
            regex: false
        }, this);

        //Adding dependency to install module
        this.addNpmDependency('rasa-webchat','github:mrbot-ai/rasa-webchat');