plaid / pattern

An example end-to-end Plaid integration to create items and fetch transaction data
MIT License
445 stars 223 forks source link

incorrectly configured environment variables. #179

Closed johndpope closed 2 years ago

johndpope commented 2 years ago

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

server@1.0.7 debug /home/ec2-user/fundfi/pattern/server nodemon --inspect=0.0.0.0:9229 index.js

[nodemon] 2.0.4 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] starting node --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

lindawoo-plaid commented 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?

johndpope commented 2 years ago

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