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

Source 1 Causes TypeError #100

Open
bill-luu opened this issue Mar 30, 2020 · 2 comments
Open

Source 1 Causes TypeError #100

bill-luu opened this issue Mar 30, 2020 · 2 comments

Comments

@bill-luu
Copy link

Fresh installation through npm install, using source 1:

bill@bill-HP-Notebook:~/Documents/SolarCar/Epsilon-Telemetry-Test-Tool$ corona --source=1
TypeError: Cannot read property 'latest' of undefined
    at confirmed.locations.forEach.obj (/usr/local/lib/node_modules/coronavirus-tracker-cli/lib/corona.js:40:41)
    at Array.forEach (<anonymous>)
    at getDataByCountry (/usr/local/lib/node_modules/coronavirus-tracker-cli/lib/corona.js:31:23)
    at exports.getCompleteTable (/usr/local/lib/node_modules/coronavirus-tracker-cli/lib/corona.js:116:23)
    at process._tickCallback (internal/process/next_tick.js:68:7)

source=2 works fine.

OS Information:

bill@bill-HP-Notebook:~/Documents/SolarCar/Epsilon-Telemetry-Test-Tool$ cat /etc/os-release
NAME="elementary OS"
VERSION="5.0 Juno"
ID=elementary
ID_LIKE=ubuntu
PRETTY_NAME="elementary OS 5.0 Juno"
LOGO=distributor-logo
VERSION_ID="5.0"
HOME_URL="https://elementary.io/"
SUPPORT_URL="https://elementary.io/support"
BUG_REPORT_URL="https://github.com/elementary/appcenter/issues/new"
PRIVACY_POLICY_URL="https://elementary.io/privacy-policy"
VERSION_CODENAME=juno
UBUNTU_CODENAME=bionic

On node version 12.16.1

@sagarkarira
Copy link
Owner

I think updating the package will solve this.

@bill-luu
Copy link
Author

bill-luu commented Apr 4, 2020

Yeah I think that's the case, but I updated and now I have:

bill@bill-HP-Notebook:~/Documents/SolarCar/Epsilon-Embedded-Software$ corona
internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module '../lib/country/us'
Require stack:
- /usr/local/lib/node_modules/coronavirus-tracker-cli/bin/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/coronavirus-tracker-cli/bin/index.js:10:25)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/coronavirus-tracker-cli/bin/index.js'
  ]
}

I think the country folder isn't on npm

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