Reputation: 2855
When I try to include the dialogflow SDK into my react app I get the following error.
As I understand from what I've read this is because fs is a server-side module rather than a client-side module. But the documentation of the SDK imply that it is meant as a front-end SDK. So I hope we can get it to work.
Steps to reproduce
I hope this can be solved.
Thanks!
Upvotes: 2
Views: 2641
Reputation: 2904
For front-end work you'll want to use the Dialogflow JavaScript Web SDK, which is available here on GitHub:
https://github.com/dialogflow/dialogflow-javascript-client
You can install this via NPM using npm install [email protected]
.
The package you are currently installing is in fact the node.js client, available here:
https://github.com/dialogflow/dialogflow-nodejs-client-v2
Upvotes: 3