Comments (9)
Hello,
I have the same issue but with the newer version of rasa-webchat. Any help please ?
Yeah I am also having the issue when I try to run it in a Linux environment.
from rasa-webchat.
@dliuproduction It works without problems π
from rasa-webchat.
Hello,
I have the same issue but with the newer version of rasa-webchat. Any help please ?
from rasa-webchat.
Hi, can you provide the snippet where you import and render the component? The error seems weird as the init
method in the plugin mode is called. The problem might be in the usage as a react component.
from rasa-webchat.
Sure!
import React, { Component } from 'react'
import { Widget } from 'rasa-webchat'
class WChat extends Component {
buildChat = () => {
return (
<Widget
interval={2000}
initPayload={"/get_started"}
socketUrl={"http://localhost:5500"}
socketPath={"/socket.io/"}
title={"Title"}
inputTextFieldHint={"Type a message..."}
connectingText={"Waiting for server..."}
embedded={true}
params={{
images: {
dims: {
width: 300,
height: 200
}
},
storage: "local"
}}
/>
)
}
render() {
return (
<div className="webchat-container" >
{this.buildChat()}
</div>
)
}
}
export default WChat;
Calling in this router:
import React from 'react';
import { BrowserRouter, Switch } from "react-router-dom";
import WChat from "./components/WebChat/WebChat";
export default () => {
return (
<BrowserRouter>
<Switch>
<Route path="/web-chat/" component={WChat} />
</Switch>
</BrowserRouter>
)
}
Another example:
import WChat from './components/WebChat/WebChat'
ReactDOM.render(<WChat />, document.getElementById('app'));
I tried a lot of differents ways, but all responds the same.
This is my webpack:
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry: './src/index.js',
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.css$/,
use: [
{ loader: 'style-loader' },
{
loader: 'css-loader'
}
]
},
{
test: /\.html$/,
exclude: /node_modules/,
loader: 'html-loader'
},
{
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 8192
}
}
]
}
]
},
output: {
filename: 'bundle.js'
},
plugins: [
new HtmlWebpackPlugin({
template: 'public/index.html'
//favicon: 'public/favicon.ico'
})
],
devServer: {
host: '0.0.0.0',
port: 3000,
overlay: true,
historyApiFallback: true,
open: true
}
};
and .babelrc:
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
Thanks for your time
from rasa-webchat.
Thanks for the example. We actually ran into the same problem on some environments, but not all. What OS are you running?
from rasa-webchat.
Tha's rare ... I'm running Ubuntu Desktop 18.10
from rasa-webchat.
Hmmm ... I downloaded the repo using the contributors steps and linked the import to the location of the repo. When I started the project it runs perfectly, but with this change in the package.json in rasa-webchat:
"webpack-cli": "^3.1.2",
When I tried without it the compiler said this:
/rasa-webchat/node_modules/webpack-cli/bin/config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,
^
TypeError: Cannot read property 'properties' of undefined
Using node 10.14.1.
from rasa-webchat.
Hi @Ripza. Can you test with branch fix/package-lock? I added fixes for webpack and build scripts.
from rasa-webchat.
Related Issues (20)
- Link Image Address HOT 1
- ΒΏCan I change the parameter language that goes in customData to the widget, without recharging the page? HOT 2
- Starting the conversation HOT 1
- how can i get response of socket.io HOT 1
- JWT authentication HOT 1
- Unable to connect to websocket getting handshake error and unable to customize the chat bot HOT 2
- How to use in Angular project HOT 1
- Table is not rendered HOT 1
- How can I change file and import it into my project? HOT 1
- I don't want the link in the button to open in a new tab. HOT 1
- Rasa 3? HOT 7
- Custom Button in the header HOT 4
- showFullScreenButton and displayUnreadCount HOT 1
- React integration HOT 1
- Not able to clone and run the code in my local HOT 3
- tooltipPayload overwrites initPayload HOT 2
- Not sure about what is the purpose of dispatch evalUrl function HOT 1
- Adding a custom component to RASA web-chat HOT 1
- Getting 'AsyncServer.enter_room' was never awaited error. HOT 2
- Bot does not respond HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasa-webchat.