question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pub_sub sample has missing dependencies

See original GitHub issue

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

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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bretambrosecommented, Jul 13, 2020

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.

1reaction
bretambrosecommented, Jul 13, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found