Sign in
Log inSign up

How to import libraries in ES6 format, when using Angular2 + TypeScript?

Vishal's photo
Vishal
·Oct 27, 2016

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.