Closed Hasnni closed 4 years ago
Hi Hasnni -
How are you setting environment variables and starting npm?
What I've found is if you use VSCode and the launch.json with F5 to debug, it works. However, if you type npm start
then the variables must be set in the console.
I tried both way but still getting same error
@Hasni what time zone are you in? Would you be open to a Teams meeting and screen share to troubleshoot?
iam trying to build client side with c# now
Okay.
The error you were getting with node just means the environment variable for the hub connection string isn't being loaded. If you come back to this sample and would like some help troubleshooting, I'd be happy to arrange a time with you. Let me know! :)
I am facing a similar issue while following: https://docs.microsoft.com/en-us/learn/modules/remotely-monitor-devices-with-azure-iot-hub/4-exercise-write-code-device-telemetry?pivots=vscode-node
Issue is while executing the service code. I have done the following apart from the mentioned when it didn't work:
@Sambitk, this repo sample uses a dramatically different version of the EventHub client than the one you linked (major versioned and different constructor paradigm).
You can ask for help on that sample at https://docs.microsoft.com/en-us/learn/support/.
Cannot read property 'createFromIotHubConnectionString' of undefined Listening on 1337.
i did all steps as explained in documents.