Nuxt + IOT (aws-iot-device-sdk)

Z├ęca Source

I create a plugin like this:

var awsIot = require('aws-iot-device-sdk')
var device = awsIot.device({
keyPath: 'xxxxxx,
certPath: 'xxxxxx,
caPath: 'xxxxxx',
clientId: 'xxxxx', 
region: 'xxxxxx',
host: 'xxxxxxxxxx.amazonaws.com'
})

It works, but displays an error message:

C:\Sistemas\AM\nodemodules\aws-iot-device-sdk\common\lib\tls-reader.js:89 Uncaught TypeError: filesys.existsSync is not a function at webpackJsonp../nodemodules/aws-iot-device-sdk/common/lib/tls-reader.js.module.exports

How can I fix this?

aws-iotnuxt.js

Answers

comments powered by Disqus