Dear
I have set up auth0 to run on my ubuntu server, where I have primarily shiny apps running on a shiny server.
If I manually trigger:
$ cd /home/<username>/shiny-auth0
$ node bin/www
the app runs as expected, having changed the proxy_pass & redirect to 3000 for auth0.
I have set
$ sudo nano /etc/systemd/system/shiny-auth0.service
so that the service should boot with the system.
But when I execute
$ sudo systemctl enable shiny-auth0
$ sudo systemctl start shiny-auth0
It just does not work.
I get the journal with
sudo journalctl -u shiny-auth0
and get the message:
– Logs begin at Tue 2020-08-11 19:13:00 UTC, end at Sun 2021-07-18 08:23:14 UTC. –
Jul 11 13:14:13 ip-172-31-47-49 systemd[1]: Started shiny-auth0.service.
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: Error: ENOENT: no such file or directory, open ‘.env’
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Object.openSync (fs.js:462:3)
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Object.readFileSync (fs.js:364:35)
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Object.config (/home/ubuntu/shiny-auth0/node_modules/dotenv/l
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Object. (/home/ubuntu/shiny-auth0/app.js:12:8)
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Module._compile (internal/modules/cjs/loader.js:999:30)
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Object.Module._extensions…js (internal/modules/cjs/loader.js
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Module.load (internal/modules/cjs/loader.js:863:32)
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at Module.require (internal/modules/cjs/loader.js:887:19)
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at require (internal/modules/cjs/helpers.js:74:18) {
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: errno: -2,
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: syscall: ‘open’,
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: code: ‘ENOENT’,
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: path: ‘.env’
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: }
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: /home/ubuntu/shiny-auth0/node_modules/passport-auth0/lib/index.js:36
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: throw new Error('You must provide the ’ + k + ’ configuration
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: ^
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: Error: You must provide the domain configuration value to use passpo
Jul 11 13:14:13 ip-172-31-47-49 ubuntu[20679]: at /home/ubuntu/shiny-auth0/node_modules/passport-auth0/lib/inde
But I have the .env file configurated in
/home//shiny-auth0/
Do you know what I am missing?
Thanks!
Clemens