comp426-2022-fall / a02

Create a command line Node.js package that ingests API data from Open-Meteo
GNU Affero General Public License v3.0
0 stars 0 forks source link

Runtime error: TypeError: moment.tz.guest is not a function #8

Closed JadJ23 closed 1 year ago

JadJ23 commented 1 year ago

What is happening?

trying to run 'npm test' command but getting a TypeError

What does the error say is happening?

TypeError: moment.tz.guest is not a function

What do you think the error means?

it does not recognize the call to the function

Command string

npm test

Code snippet

image

Error log

TypeError: moment.tz.guest is not a function at file:///mnt/c/Users/jad23/workspace/a02-JadJ23/cli.js:15:28 at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:533:24) at async loadESM (node:internal/process/esm_loader:91:5) at async handleMainPromise (node:internal/modules/run_main:65:12)

Node.js version

16.17

Operating system

Linux jad23-pc 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 G

jessikka12 commented 1 year ago

hi, a quick google search leads me to believe that this is a typo. You should use moment.tz.guess() instead of guest().

JadJ23 commented 1 year ago

thank you. In the readme it said guest