pub_sub sample has missing dependencies
See original GitHub issueConfirm by changing [ ] to [x] below to ensure that it’s a bug:
- I’ve searched for previous similar issues and didn’t find any solution
Known Issue
- I’m using ATS data type endpoint: the endpoint should look like
<prefix>-ats.iot.<region>.amazonaws.com
Describe the bug Installing npm dependencies throws imports errors.
SDK version number
v1.2.1
Platform/OS/Hardware/Device Windows 10/workstation PC
To Reproduce (observed behavior)
Run npm i.
Expected behavior Installing npm deps should not error. Sample should work out of the box.
Logs/output
$ npm i
> aws-crt@1.1.8 install C:\workspace\nodejs\pub_sub\node_modules\aws-crt
> node ./scripts/install.js
> pub-sub@1.0.0 prepare C:\workspace\nodejs\pub_sub
> npm run tsc
> pub-sub@1.0.0 tsc C:\workspace\nodejs\pub_sub
> tsc
> pub-sub@1.0.0 tsc C:\workspace\nodejs\pub_sub
> tsc
index.ts:6:16 - error TS2305: Module '"./node_modules/aws-iot-device-sdk-v2/dist"' has no exported member 'auth'.
~~~~
index.ts:6:22 - error TS2305: Module '"./node_modules/aws-iot-device-sdk-v2/dist"' has no exported member 'http'.
6 import { mqtt, auth, http, io, iot } from 'aws-iot-device-sdk-v2';
~~~~
index.ts:6:28 - error TS2305: Module '"./node_modules/aws-iot-device-sdk-v2/dist"' has no exported member 'io'.
6 import { mqtt, auth, http, io, iot } from 'aws-iot-device-sdk-v2';
~~
index.ts:6:32 - error TS2305: Module '"./node_modules/aws-iot-device-sdk-v2/dist"' has no exported member 'iot'.
6 import { mqtt, auth, http, io, iot } from 'aws-iot-device-sdk-v2';
~~~
index.ts:6:22 - error TS2305: Module '"./node_modules/aws-iot-device-sdk-v2/dist"' has no exported member 'http'.
6 import { mqtt, auth, http, io, iot } from 'aws-iot-device-sdk-v2';
~~~~
index.ts:6:28 - error TS2305: Module '"./node_modules/aws-iot-device-sdk-v2/dist"' has no exported member 'io'.
6 import { mqtt, auth, http, io, iot } from 'aws-iot-device-sdk-v2';
~~
index.ts:6:32 - error TS2305: Module '"./node_modules/aws-iot-device-sdk-v2/dist"' has no exported member 'iot'.
6 import { mqtt, auth, http, io, iot } from 'aws-iot-device-sdk-v2';
~~~
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Troubleshooting | Cloud Pub/Sub Documentation
Publish operations fail with DEADLINE_EXCEEDED · Check whether you are publishing messages faster than the client can send them. · Check that you...
Read more >Problem with Google Cloud Pub/Sub API and Spring boot ...
In your case, somethng is missed, Kindly ensure that dependencies are in place or recreate following bean to make it work.
Read more >pubsub
Package pubsub provides an easy way to publish and receive Google Cloud Pub/Sub messages, hiding the details of the underlying server RPCs.
Read more >terraform-google-modules/pubsub ...
This is a simple usage of the module. Please see also a simple setup provided in the example directory. module "pubsub" { source ......
Read more >pscoped/ngx-pub-sub
@pscoped/ngx-pub-sub. TypeScript icon, indicating that this package has built-in type declarations · Readme · Code Beta · 1 Dependency · 0 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

On the surface, it looks like you’re running the latest samples (which expect the crt modules to be exported by the sdk) against the 1.2.1 sdk which does not export them. I am making a new release in a few minutes, so once 1.2.2 posts, give it a clean, self-contained try.
I am not able to reproduce this. We recently made a change to export all the crt modules from the sdk: https://github.com/aws/aws-iot-device-sdk-js-v2/blob/master/lib/index.ts#L22 Can you try a clean install of the sdk and report the results?