Closed johndpope closed 2 years ago
@johndpope
regarding this:
const { REACT_APP_SERVER_PORT } = process.env; shouldn't it be const REACT_APP_SERVER_PORT = process.env.REACT_APP_SERVER_PORT; ??
The two are equivalent. Are you running this in Docker?
I'm not. I need to dig deeper into why this isn't setting correctly. I understand it's all working with docker - I'm on centos arm64 / node version - v14.18.1
I'll circle back to update any findings - the failure to detect .env variables may have something to do with I'm using zsh https://gist.github.com/aaabramov/0f1d963d788bf411c0629a6bcf20114d
https://github.com/plaid/pattern/blob/e0da5bd209416b3bc811e4d8e81d8e461c874d92/client/src/components/Sockets.jsx#L6
const { REACT_APP_SERVER_PORT } = process.env; shouldn't it be const REACT_APP_SERVER_PORT = process.env.REACT_APP_SERVER_PORT; ??
this is also happening on server/index.js const { PORT } = process.env;
shouldn't it be const PORT = process.env.PORT;
???
➜ server git:(pattern) ✗ npm run debug
[nodemon] 2.0.4 [nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] startingnode --inspect=0.0.0.0:9229 index.js
Debugger listening on ws://0.0.0.0:9229/6bcad4cf-82ee-4b49-870d-f5827c7c7a72 For help, see: https://nodejs.org/en/docs/inspector listening on port undefined