0

In my project (using the ionic-framework 3) I have used following statement to require the dialogflow module:

const dialogflow = require('dialogflow');

On compilation it's throwing the following error:

cannot find name 'require'.

How can I resolve this?

iLuvLogix
  • 5,920
  • 3
  • 26
  • 43
raj_tx
  • 229
  • 1
  • 5
  • 18

1 Answers1

0

Add types to tsconfig.json

"types": [
    "node"
],
"typeRoots": [
    "node_modules/@types"
]
Sachila Ranawaka
  • 39,756
  • 7
  • 56
  • 80