Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'toFixed') #6

Open
SinbadSails opened this issue May 26, 2023 · 2 comments
Open

Comments

@SinbadSails
Copy link

Hello,

I am trying to understand why i am getting the errors

/Users/bipulmainali/stocks/stocks.js:37 process.stdout.write(\x1b[37m${quote.price.toFixed(2)}${randchars[Math.floor(Math.random() * 10)]}`);
^

TypeError: Cannot read properties of undefined (reading 'toFixed')
at Timeout.grab [as _onTimeout] (/Users/bipulmainali/stocks/stocks.js:37:49)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.0.0`

my ticker list is :

module.exports = [ 'BSX', 'EW', 'ABT', 'ISRG', 'MRNA', 'AMGN', 'LLY', 'NVO', 'PFE', 'MORF', 'PRTA', 'JNJ', 'MDT', 'SYK', 'BMY', 'GILD', 'VRTX', 'REGN', 'BIIB', 'TMO', 'ALGN', 'ILMN', 'ZBH', 'INCY', 'ALXN', 'DXCM', 'HOLX', 'RMD', 'VAR', 'EDIT', 'NTLA', 'BEAM', 'BLUE', 'IOVA', 'ARVN', 'SGMO', 'MRTX', 'SRNE', 'ATRA', 'ARWR', 'AKBA', 'FGEN', 'RVNC' ]

@SinbadSails
Copy link
Author

@martinshkreli

@vimark1
Copy link

vimark1 commented Sep 1, 2023

@SinbadSails Try using node 18, that's what was available when this repo was made

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants