I've been working with the ng2-mqtt library and have integrated it into my component as shown below:
import 'ng2-mqtt/mqttws31.js';
declare var Paho: any;
However, I encountered the following error:
ReferenceError: window is not defined at Object.<anonymous> (/Users/Picchu/Documents/em3/node_modules/ng2-mqtt/mqttws31.js:2143:4) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/Picchu/Documents/em3/dist/server.js:18707:18)
Any suggestions on how to resolve this issue?