icanos / ng2-mqtt

Angular2 port of the mqttws31 library
17 stars 24 forks source link

Cannot find module 'mqttws31' #3

Closed pdashford closed 7 years ago

pdashford commented 8 years ago

I have installed the package using nom and is in my packages.json, however when trying to import this in angular2 i get an error stating it cannot find the module. I have sourceMapping set to true. Could you perhaps provide more information on how to get this up and running, does there need to be any additional scripts adding to index.html? Thanks in advance.

icanos commented 8 years ago

You need to include the mqttws31.js script in your index.html file.

Hope it helps!

riccardodegan-geekcups commented 7 years ago

I have use:

import {Paho} from 'ng2-mqtt/mqttws31';

instead of:

import {Paho} from 'mqttws31';

and it work!