I have a requirement of using Alexa Voice service APIs inside my Angular2 + TypeScript application. This is the library — https://www.npmjs.com/package/alexa-voice-service — which helps me authenticate and do other required stuff within my application.
I have configured this in my SystemJS config. But I get an error :
system.src.js:123 Uncaught (in promise)
Error: ReferenceError: require is not defined(…).
I am unable to figure out how to resolve this issue. Any thoughts would help.
Wendy Sanarwanto
Freelance Software Engineer, Team Lead & Analyst at Reputable Outsource Company in Indonesia
That error happens probably because the alexa-voice-service's JS Files, do not have any .d.ts (typescript typings) files which are required by typescript to recognise any types within JS Files in alexa-voice-service. What are the content of node_modules/alex-voice-service ? Does this library has a number of .d.ts files inside ?