Azure / azure-event-hubs-node

Node client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
MIT License
50 stars 44 forks source link

cannot find module 'bluebird' #18

Closed SummerSun closed 6 years ago

SummerSun commented 7 years ago

Node version: v6.10.0 NPM version: 3.10.8 package azure-event-hubs version: 0.0.6

reference the azure-event-hubs and import the client, sender. Met following compile errors:

node_modules/azure-event-hubs/lib/client.d.ts(4,26): error TS2307: Cannot find module 'bluebird'. node_modules/azure-event-hubs/lib/receiver.d.ts(5,26): error TS2307: Cannot find module 'bluebird'. node_modules/azure-event-hubs/lib/sender.d.ts(4,26): error TS2307: Cannot find module 'bluebird'.

once click into the error (in vscode output view), the error and red line just disappear.

Check the typings.json:

{ "name": "azure-event-hubs", "dependencies": { "bluebird": "registry:npm/bluebird#3.3.4+20160802085254" }, "globalDependencies": { "node": "registry:dt/node#6.0.0+20160807145350" } }

but the bluebird version is different in package.json:

"dependencies": { "amqp10": "3.4.1", "azure-iot-common": "1.1.3", "bluebird": "^3.4.7", "uuid": "^3.0.1" },

Found some clue in stackoverflow about typings, tried: typings install bluebird, problem solve.

amarzavery commented 6 years ago

@SummerSun - We have a new preview version "0.1.0" of the event hubs node.js client. This client was re-written from scratch. Please try the new version and let us know if you still see issues. You can find examples over here.