Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when implement reactwebchat #3942

Closed
samu9349 opened this issue Jun 10, 2021 · 2 comments
Closed

Getting error when implement reactwebchat #3942

samu9349 opened this issue Jun 10, 2021 · 2 comments
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. Duplicate This issue or pull request already exists

Comments

@samu9349
Copy link

i have run

npm install botframework-webchat
npm install --save botframework-directlinejs

my package.json
{
"name": "my-reactapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.13.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.23",
"@types/node": "^12.20.15",
"@types/react": "^17.0.11",
"@types/react-dom": "^17.0.7",
"botframework-directlinejs": "^0.14.1",
"botframework-webchat": "^4.13.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"typescript": "^4.3.2",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

my react component

import { DirectLine } from 'botframework-directlinejs';
import React, { useEffect, useState } from 'react';
import ReactWebChat from 'botframework-webchat';
export const Chatboat = () => {
const [directLineToken, setDirectLineToken] = useState();

useEffect(() => {
    fetch("https://webchat-mockbot.azurewebsites.net/directline/token").then(
        res => setDirectLineToken(res)
    ).catch(err=>{
        console.log(err);
    })
})   
return (        
    <ReactWebChat directLine={directLineToken} />        
);

};

am getting below error...

Type '{ directLine: any; }' is not assignable to type 'IntrinsicAttributes & Omit<ReactWebChatProps, "styleOptions"> & { styleOptions?: FullBundleStyleOptions | undefined; } & { ...; }'.
Property 'directLine' does not exist on type 'IntrinsicAttributes & Omit<ReactWebChatProps, "styleOptions"> & { styleOptions?: FullBundleStyleOptions | undefined; } & { ...; }'.

please help me

@v-kydela v-kydela added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. labels Jun 10, 2021
@stevkan stevkan self-assigned this Jun 10, 2021
@compulim
Copy link
Contributor

We are fixing this.

Please this track this issue through #3856.

@compulim compulim added the Duplicate This issue or pull request already exists label Jun 10, 2021
@samu9349
Copy link
Author

Thanks for consider this issue.. please update the fix and steps to try to make it works. it will be very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. Duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants