Open 1div0error opened 2 years ago
Hello! Those are typical warnings from node, but I don't know that they should affect the application running. What steps have you tried?
Hello mm-wang, thank you for your help! What I did:
[23:44:33] Using gulpfile ~\Desktop\WebApplicationWorkshop-master\gulpfile.js
[23:44:33] Starting 'default'...
[23:44:33] Starting 'prepSass'...
[23:44:33] Starting 'lintServerJs'...
[23:44:33] Finished 'prepSass' after 398 ms
[23:44:33] Finished 'lintServerJs' after 543 ms
[23:44:33] Starting 'lintBrowserJs'...
[23:44:33] Finished 'lintBrowserJs' after 271 ms
[23:44:33] Starting 'prepJsBrowserSrc'...
[23:44:33] Finished 'prepJsBrowserSrc' after 32 ms
[23:44:33] Starting 'jsRollup'...
[23:44:36] Finished 'jsRollup' after 2.08 s
[23:44:36] Starting 'watchBrowserJs'...
[23:44:36] Starting 'watchSass'...
[23:44:36] Starting 'watchServerJs'...
Error: secret option required for sessions
at session (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express-session\index.js:200:12)
at Layer.handle [as handle_request] (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:317:13)
at C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:275:10)
at urlencodedParser (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\body-parser\lib\types\urlencoded.js:91:7)
at Layer.handle [as handle_request] (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:317:13)
at C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:275:10)
at jsonParser (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\body-parser\lib\types\json.js:110:7)
at Layer.handle [as handle_request] (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:317:13)
at C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\lib\router\index.js:275:10)
at SendStream.error (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\node_modules\serve-static\index.js:121:7)
at SendStream.emit (events.js:400:28)
at SendStream.error (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\node_modules\send\index.js:270:17)
at SendStream.onStatError (C:\Users\User\Desktop\WebApplicationWorkshop-master\node_modules\express\node_modules\send\index.js:421:12)
Do you have any idea whats the problem? Thank you!
Yes, you are missing environment variables. As this was created for a workshop 3 years ago, there was an accompanying series of steps, including configuring a token to use Rhino Compute and a database. I am unfortunately not able to provide the workshop contents, but the error is pretty self explanatory - you need an environment variable for the application to validate the API calls from the client to the server that you are running. Anything you'll find after process.env.
in all capitals will be a environment variable you require.
PORT
: the port you want to run on
RHINOCOMPUTE_TOKEN
: token you get from signing on to rhino compute, which you would need to get separately
SESSION_SECRET
: a series of characters to authenticate from server to browser
DATABASE_URI
: a URI to a database that you've set up
Many thanks for your help 🙏
Hi,
if I try to run your application, following the instructions, I get this erros:
Do you have any idea why I can not run your app? Thank you and best regards