kartben / lorawan-node-simulator

Simulation infrastructure for a LoRaWAN network (gatways and end devices) that's easy to configure and run from your CLI. Also available as a Docker container.
MIT License
103 stars 13 forks source link

Not recognizing .env file #3

Closed mrpher closed 3 years ago

mrpher commented 3 years ago

Thanks for building this. Am excited to utilize. I can't seem to overcome this error though: ERROR: Make sure to set the NETWORK_SERVER_URI, NETWORK_SESSION_KEY, APPLICATION_SESSION_KEY prior to launching the simulation.

Have a .env in root, even tried manually overriding in index.js line 13-15.

const NETWORK_SERVER_URI = 'udp://example.com1700';
const NETWORK_SESSION_KEY = '4CC[[redacted]]4AE8EF';
const APPLICATION_SESSION_KEY = 'B897[[redacted]]3CEF3';

Any ideas?

kartben commented 3 years ago

Sorry to hear you're having issues. Can you try setting these as actual environment variables (ex. EXPORT XXX=... on Linux) instead of using a .env file?)

kartben commented 3 years ago

Also just thought I would mention the index.js file is compiled from index.ts so it may get replaced depending on how you're running the tool, so maybe that's why your change to hard-code the settings hasn't worked.

mrpher commented 3 years ago

Sorry I had configured .env with ":" instead of "=", whoops. Thanks!

kartben commented 3 years ago

I see! This potential mistake of yours came to mind too, but I'm glad you figured it out already! Please don't hesitate if you run into other problems or have other questions.