thunderhub
thunderhub copied to clipboard
Can't launch secure mode
Hi,
I have followed the steps of generating an SSL certificate with ZeroSSL and modified the .env.local file but getting the following error when I try start ThunderHub.
Any help greatly appreciated.
sudo npm run start:secure
> [email protected] start:secure /home/ubuntu/opt/code/thunderhub
> node server/utils/secure-server.js
/home/ubuntu/opt/code/thunderhub/server/utils/secure-server.js:29
key: certData?.privateKey.toString(),
^
SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start:secure: `node server/utils/secure-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:secure script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-05-14T22_48_32_074Z-debug.log
my Node version was not latest.
Now I am getting the following error
sudo npm run start:secure
> [email protected] start:secure /home/ubuntu/opt/code/thunderhub
> node server/utils/secure-server.js
/home/ubuntu/opt/code/thunderhub/server/utils/secure-server.js:12
throw new Error('Running a secure server can only be done in production');
^
Error: Running a secure server can only be done in production
at Object.<anonymous> (/home/ubuntu/opt/code/thunderhub/server/utils/secure-server.js:12:9)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start:secure: `node server/utils/secure-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:secure script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-05-14T23_52_57_472Z-debug.log
How can I run it in production?
I set inside /etc/environment NODE_ENV='production' went a little further.
Now it is complaining about next.Config.js.
Some better instructions to compile and run in secure mode would be much appreciated.
Why do you need to run in this way? This is a setup that's very specific for Voltage
I dont want my login password to be transferred in-encrypted.
Sent from my iPhone
On 16 May 2021, at 11:17, Anthony Potdevin @.***> wrote:
Why do you need to run in this way? This is a setup that's very specific for Voltage
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.