Open Antondj5 opened 4 years ago
When commenting out type: common_1.TlvDataType[from.ct],
in /arm-connector/node_modules/mbed-cloud-sdk/lib/legacy/connect/models/deviceEventAdapter.js:30
my code works as expected.
DeviceEventAdapter.mapResource = function (from, deviceId) {
console.log('from', from)
console.log('common_1', common_1)
return {
contentType: from.rt,
observable: from.obs,
// type: common_1.TlvDataType[from.ct],
path: from.path,
deviceId: deviceId,
};
};
What environment are you running in? I just added a test to check the mapping and it worked fine. It looks like either something has gone wrong with the module resolution or your environment can't understand the enum.
I'm running a node v10.19.0 environment on MacOS Mojave v10.14.6. Do I need a more recent version of node? Edit: I also use yarn v1.22.0 as a package manager.
I use 10.18.0 so that shouldn't be an issue. I will investigate further today
While trying to create a connector to subscribe to value changes of devices on the ARM Pelion platform I ran in to an issue. When connecting my device (a linux vm) to the Pelion platform (using this tutorial) while the following code is running I get the error you can see below.
Am I doing something wrong or is this a problem with the SDK?
The code works fine when I start my application and my device is already registered. The code fails when the code is running and I connect the device afterwards (execute the script -> see link to tutorial above).