Import MqttModule Problem Angular 11
CarlosOliverHM opened this issue · comments
Current behavior
When I add MqttModule.forRoot(MQTT_SERVICE_OPTIONS)
in app.module.ts I get:
Expected behavior
No problems in localhost:4200
Environment
import { IMqttServiceOptions, MqttModule} from "ngx-mqtt";
import { environment as env } from '../environments/environment';
const MQTT_SERVICE_OPTIONS: IMqttServiceOptions = {
hostname: env.mqtt.server,
port: env.mqtt.port,
protocol: (env.mqtt.protocol === "wss") ? "wss" : "ws",
path: '',
};
imports: [
...
MqttModule.forRoot(MQTT_SERVICE_OPTIONS),
...
],
ngx-mqtt version: 7.0.9
It is not possible to install the new version in Angular 11, because has the problem of Angular 11 compatibility with ngx-mqtt #17 issue.
Duplicated by #170