Open Guangrun opened 4 years ago
TypeError: this.getJhipsterAppConfig is not a function
@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');
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)