burnedikt / diasend-nightscout-bridge

Synchronize your diasend data to nightscout.
MIT License
18 stars 18 forks source link

TypeError: "x" is not a constructor #39

Closed jay-beco closed 1 year ago

jay-beco commented 1 year ago

janbeco@0E_99_4A_98_A0_B6 diasend-nightscout-bridge % yarn start yarn run v1.22.19 $ npm run run

diasend-nightscout-bridge@0.1.2 run npm run build && node dist/cli/run.js

diasend-nightscout-bridge@0.1.2 build tsc

/Users/janbeco/Documents/GitHub/diasend-nightscout-bridge/dist/index.js:54 return new nightscout_1.NightscoutHttpClient(config_1.default.nightscout.url, config_1.default.nightscout.apiSecret, { app: "diasend" }); ^

TypeError: nightscout_1.NightscoutHttpClient is not a constructor at getNightscoutHttpClient (/Users/janbeco/Documents/GitHub/diasend-nightscout-bridge/dist/index.js:54:12) at startSynchronization (/Users/janbeco/Documents/GitHub/diasend-nightscout-bridge/dist/index.js:73:108) at Object. (/Users/janbeco/Documents/GitHub/diasend-nightscout-bridge/dist/cli/run.js:4:30) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

jay-beco commented 1 year ago

Help please

TypeError: "x" is not a constructor The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor, but that object or variable is not a constructor.

Message TypeError: x is not a constructor (V8-based & Firefox & Safari)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_constructor

Not sure what to do with this.

Thanks, Jan

jay-beco commented 1 year ago

A full reinstall has solved the problem.