These are chat archives for nightscout/intend-to-bolus

7th
Oct 2018
peterfulvi
@peterfulvi
Oct 07 2018 00:43
I ran cd ~/src/oref0 npm run global-install and got this output
npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
npm notice created a lockfile as package-lock.json. You should commit this file.
added 105 packages from 81 contributors, removed 50 packages, updated 4 packages, moved 25 packages and audited 397 packages in 70.051s
found 18 vulnerabilities (1 low, 13 moderate, 3 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
sudo: unable to resolve host nsrig
npm ERR! path /home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv' -> '/home/.rootfs/usr/lib/node_modules/.staging/ajv-35266d5e'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-07T00_41_49_966Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 254
npm ERR! oref0@0.6.2 global-install: `npm install && sudo npm install -g && sudo npm link && sudo npm link oref0`
npm ERR! Exit status 254
npm ERR!
npm ERR! Failed at the oref0@0.6.2 global-install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-07T00_41_50_169Z-debug.log
Jeremy Cunningham
@jpcunningh
Oct 07 2018 01:52
@peterfulvi, that NPM error may indicate why npm didn't install yargs.
peterfulvi
@peterfulvi
Oct 07 2018 01:53
@jpcunningh so im installing the latest node-js package which includes the lartest npm https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions. Im hoping this will fix it .
Jeremy Cunningham
@jpcunningh
Oct 07 2018 01:54
you can try npm install, npm install -g, npm link and npm link oref0 separately to start drilling down...
yeah, probably a good first step...
peterfulvi
@peterfulvi
Oct 07 2018 01:55
@jpcunningh great I'll start there thanks
Jeremy Cunningham
@jpcunningh
Oct 07 2018 01:56
one think that was interesting is the sudo: unable to resolve host nsrig error. that may also be related.
is nsrig listed in the /etc/hosts file?
peterfulvi
@peterfulvi
Oct 07 2018 02:02
@jpcunningh I dont know. I ran the setup script in the begining again and after i named my rig that kept popping up. It says right now i should run npm audit fix to fix the issues
when i run npm install
npm install -g outputs
npm ERR! path /home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv' -> '/home/.rootfs/usr/lib/node_modules/.staging/ajv-35266d5e'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-07T02_02_52_778Z-debug.log
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:03
hmm... i don't think npm audit fix will help your primary issue. i think that is more to upgrade packages to newer versions that fix known security vulnerabilities
peterfulvi
@peterfulvi
Oct 07 2018 02:07
this was my last output after npm install
root@nsrig:~/src/oref0# npm install
removed 66 packages and audited 397 packages in 34.787s
found 18 vulnerabilities (1 low, 13 moderate, 3 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:07
ok. mine does the same. that won't prevent it from working.
you might try deleting the ~/src/oref0/package-lock.json file
then npm install followed by npm install -g again
peterfulvi
@peterfulvi
Oct 07 2018 02:11
Ok. Im trying to reinstall node-js again and make sure i install everything. It said something about installing yarnpkgs but could not verify them, but asked if i wanted to go ahead and install them anyways
Install these packages without verification? [y/N] n
E: Some packages could not be authenticated
peterfulvi
@peterfulvi
Oct 07 2018 02:17
@jpcunningh i ran those commands and npm install gave me this
root@nsrig:~/src/oref0# npm install
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm notice created a lockfile as package-lock.json. You should commit this file.
added 65 packages from 54 contributors and audited 397 packages in 43.996s
found 18 vulnerabilities (1 low, 13 moderate, 3 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:17
does npm install -g work now?
peterfulvi
@peterfulvi
Oct 07 2018 02:19
i got a big list this is the last half
```
/home/.rootfs/usr/bin/oref0-copy-fresher -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-copy-fresher
/home/.rootfs/usr/bin/oref0-crun -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-conditional-run.sh
/home/.rootfs/usr/bin/oref0-delete-future-entries -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-delete-future-entries.sh
/home/.rootfs/usr/bin/oref0-detect-sensitivity -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-detect-sensitivity.js
/home/.rootfs/usr/bin/oref0-determine-basal -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-determine-basal.js
/home/.rootfs/usr/bin/oref0-dexusb-cgm-loop -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-dexusb-cgm-loop.py
/home/.rootfs/usr/bin/oref0-dex-is-fresh -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-dex-is-fresh.sh
/home/.rootfs/usr/bin/oref0-dex-time-since -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-dex-time-since.sh
/home/.rootfs/usr/bin/oref0-dex-wait-until-expected -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-dex-wait-until-expected.sh
/home/.rootfs/usr/bin/oref0-find-insulin-uses -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-find-insulin-uses.js
/home/.rootfs/usr/bin/oref0-fix-git-corruption -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-fix-git-corruption.sh
/home/.rootfs/usr/bin/oref0-get-profile -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-get-profile.js
/home/.rootfs/usr/bin/oref0-html -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-html.js
/home/.rootfs/usr/bin/oref0-ifttt-notify -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-ifttt-notify
/home/.rootfs/usr/bin/oref0_init_pump_comms.py -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0_init_pump_comms.py
/home/.rootfs/usr/bin/oref0-log-shortcuts -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-log-shortcuts.sh
/home/.rootfs/usr/bin/oref0-mdt-trend -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-mdt-trend.js
/home/.rootfs/usr/bin/oref0-meal -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-meal.js
/home/.rootfs/usr/bin/oref0-normalize-temps -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-normalize-temps.js
/home/.rootfs/usr/bin/oref0-ns-loop -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-ns-loop.sh
/home/.rootfs/usr/bin/oref0_nightscout_check -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0_nightscout_check.py
/home/.rootfs/usr/bin/oref0-online -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-online.sh
/home/.rootfs/usr/bin/oref0-pebble -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-pebble.js
/home/.rootfs/usr/bin/oref0-pump-loop -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-pump-loop.sh
/home/.rootfs/usr/bin/oref0-radio-reboot -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-radio-reboot.sh
/home/.rootfs/usr/bin/oref0-pushover -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-pushover.sh
/home/.rootfs/usr/bin/oref0-reset-git -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-reset-git.sh
/home/.rootfs/usr/bin/oref0-raw -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-raw.js
/home/.rootfs/usr/bin/oref0-reset-usb -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-reset-usb.sh
/home/.rootfs/usr/bin/oref0-set-device-clocks -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-set-device-clocks.sh
/home/.rootfs/usr/bin/oref0-set-system-clock -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-set-system-clock.sh
/home/.rootfs/usr/bin/oref0-set-local-temptarget -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-set-local-temptarget.js
/home/.rootfs/usr/bin/oref0-setup -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-setup.sh
/home/.rootfs/usr/bin/oref0-subg-ww-radio-parameters -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-subg-ww-radio-parameters.sh
/home/.rootfs/usr/bin/oref0_subg_ww_radio_parameters.py -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0_subg_ww_radio_parameters.py
/home/.rootfs/usr/bin/oref0-truncate-git-history -> /home/.rootfs/usr/lib/node_modules/oref0/bin/oref0-truncat
Scott Leibrand
@scottleibrand
Oct 07 2018 02:19
ironic that it truncated it after truncat ;-)
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:19
those look promising!
Scott Leibrand
@scottleibrand
Oct 07 2018 02:20
but yeah, that is it doing the npm link step successfully
peterfulvi
@peterfulvi
Oct 07 2018 02:20
theres more
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:20
ha ha!
peterfulvi
@peterfulvi
Oct 07 2018 02:20
:-\
Scott Leibrand
@scottleibrand
Oct 07 2018 02:20
does it appear to have worked?
peterfulvi
@peterfulvi
Oct 07 2018 02:20
I will run setup again
peterfulvi
@peterfulvi
Oct 07 2018 02:27
No luck it errored out
updated 134 packages in 63.752s
Checking mmeowlink installation
Version: 0.11.1
module.js:550
    throw err;
    ^

Error: Cannot find module 'oref0/lib/profile/'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/root/src/oref0/bin/oref0-get-profile.js:19:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
Could not run oref0-get-profile
it errors out when i run oref0-get-profile
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:32
that's a different error than before, though, yes
?
peterfulvi
@peterfulvi
Oct 07 2018 02:33
i ran npm install this is new
npm WARN saveError ENOENT: no such file or directory, open '/root/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.
@jpcunningh Yes
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:33
any chance npm install -g failed?
peterfulvi
@peterfulvi
Oct 07 2018 02:34
i'll try
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:34
looks like you may be in the wrong directory. you need to cd ~/src/oref0 first, then npm install followed by npm install -g
peterfulvi
@peterfulvi
Oct 07 2018 02:37
npm install
root@nsrig:~/src/oref0# npm install
added 133 packages from 94 contributors and audited 397 packages in 40.977s
found 18 vulnerabilities (1 low, 13 moderate, 3 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:37
ok. that looks good... now npm install -g
peterfulvi
@peterfulvi
Oct 07 2018 02:38
npm -g
root@nsrig:~/src/oref0# npm install -g
npm ERR! path /home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv' -> '/home/.rootfs/usr/lib/node_modules/.staging/ajv-35266d5e'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-07T02_38_15_504Z-debug.log
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:39
I think whatever that is, it is the root problem.
peterfulvi
@peterfulvi
Oct 07 2018 02:40
So i should resolve my host name? How do i do that. Should i setup again?
Jeremy Cunningham
@jpcunningh
Oct 07 2018 02:41
you can edit /etc/hosts to resolve it if you like...
add nsrig to the end of the line that starts with 127.0.0.1
Scott Leibrand
@scottleibrand
Oct 07 2018 02:41
npm ERR! enoent ENOENT: no such file or directory, rename '/home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv' -> '/home/.rootfs/usr/lib/node_modules/.staging/ajv-35266d5e' seems to be your main problem
don't worry about the sudo thing
that would probably be fixed by a reboot
and it's just a cosmetic warning anyway
I would just rm -rf /home/.rootfs/usr/lib/node_modules/.staging/ and try again
peterfulvi
@peterfulvi
Oct 07 2018 02:43
Ok.
Should i run npm install after rm -rf /home/.rootfs/usr/lib/node_modules/.staging/
Scott Leibrand
@scottleibrand
Oct 07 2018 02:44
yeah, re-run whatever install you were doing that was failing
peterfulvi
@peterfulvi
Oct 07 2018 02:46
Ok still
root@nsrig:~/src/oref0# npm install -g
npm ERR! path /home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv' -> '/home/.rootfs/usr/lib/node_modules/.staging/ajv-35266d5e'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-07T02_46_20_693Z-debug.log
Coffee Break
Scott Leibrand
@scottleibrand
Oct 07 2018 02:50
I'd back up and retry the earlier steps that would have created that file/directory
Jeremy Cunningham
@jpcunningh
Oct 07 2018 03:08
you might try running npm uninstall ajv (google says that fixed a similar problem for some people)
sorry... you would need to do npm -g uninstall ajv
then run the npm install -g command again.
peterfulvi
@peterfulvi
Oct 07 2018 03:39
@jpcunningh @scottleibrand i will try that thanks
peterfulvi
@peterfulvi
Oct 07 2018 04:40
still the same error
root@nsrig:~/src/oref0# npm -g uninstall ajv
up to date in 1.464s
root@nsrig:~/src/oref0# npm install -g
npm ERR! path /home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/.rootfs/usr/lib/node_modules/.staging/oref0-aa44602e/node_modules/ajv' -> '/home/.rootfs/usr/lib/node_modules/.staging/ajv-35266d5e'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-07T04_39_47_404Z-debug.log
This is running on raspberry pi? On raspian?
I wonder if it would be beneficial to people to package OpenAPS in docker
Hm, that could make installing and updating easier, but could make access to devices harder...
Matt Kupisz
@rumil
Oct 07 2018 09:34
Just a few days ago I’ve been installing dev on my Mac and was having the same problem @peterfulvi . What has worked for me is downgrading node from v10.11.0 to v8.12.0