aws / aws-iot-device-sdk-js

SDK for connecting to AWS IoT from a device using JavaScript/Node.js
Apache License 2.0
964 stars 384 forks source link

Package doesn't include examples when downloaded via AWS Management Console #389

Closed Dazza65 closed 3 years ago

Dazza65 commented 3 years ago

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug start.sh does not complete and reports an error that it cannot find module '/Users/*****/Development/AWS/IoT/things/thing1/node_modules/aws-iot-device-sdk/examples/device-example.js'

Also, why is v2 of the SDK not used in this scenario as v1 is no longer receiving updates?

SDK version number 2.2.10

Platform/OS/Hardware/Device MacOS v 11.4 / MacBook Air / Node v14.15.5

To Reproduce (observed behavior) Use the AWS Management Console -> IoT Core -> Onboard -> Getting Started Select Linux/OSX & Node.js Complete the thing name and download the "connection kit" sh ./start.sh

Expected behavior The code should send messages to IoT Core for display in the management console.

Logs/output Running pub/sub sample application... internal/modules/cjs/loader.js:883 throw err; ^

Error: Cannot find module '/Users/*****/Development/AWS/IoT/things/thing1/node_modules/aws-iot-device-sdk/examples/device-example.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) at Function.Module._load (internal/modules/cjs/loader.js:725:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Additional context The referenced examples directory does not exist in the aws-iot-device-sdk module, however I can see that it's part of the source code if I download it from github.

bretambrose commented 3 years ago

Samples got filtered out in a recent revamp of the release process; I didn't realize the console scripts would be affected. I'll update the .npmignore and do a re-release.

bretambrose commented 3 years ago

This should be addressed by the latest version (2.2.11)

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.