在reactjs应用程序中使用aws-iot-device-sdk时出现构建错误

时间:2017-05-29 15:13:35

标签: reactjs aws-iot

我正在尝试在reactjs应用程序中使用aws-iot-device-sdk js sdk。我收到了以下错误..

ERROR in ./~/aws-iot-device-sdk/common/lib/tls-reader.js Module not found: Error: Cannot resolve module 'fs' in /Users/xxxxx/react/aws-iot/node_modules/aws-iot-device-sdk/common/lib @ ./~/aws-iot-device-sdk/common/lib/tls-reader.js 17:16-29

ERROR in ./~/aws-iot-device-sdk/device/lib/tls.js Module not found: Error: Cannot resolve module 'tls' in /Users/xxxx/react/aws-iot/node_modules/aws-iot-device-sdk/device/lib @ ./~/aws-iot-device-sdk/device/lib/tls.js 17:10-24

如何摆脱这些错误?

0 个答案:

没有答案