Read the statement by Michael Teeuw here.
MMM-Fitbit2
-
Seems to be working properly. Apparently Fitbit doesn’t like it when you set your own calorie goals.
-
./Init.sh ISSUE
I’m new to modules etc, so sorry if this is a dumb issue. When I run ./init.sh in the terminal I get the error message
"
npm ERR! must provide string specnpm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-06-05T13_55_01_431Z-debug.log
"
The debug log
"
0 verbose cli [ ‘/usr/bin/node’, ‘/usr/local/bin/npm’, ‘install’ ]
1 info using npm@7.16.0
2 info using node@v10.23.1
3 timing npm:load:whichnode Completed in 8ms
4 timing config:load:defaults Completed in 11ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 11ms
6 timing config:load:builtin Completed in 13ms
7 timing config:load:cli Completed in 13ms
8 timing config:load:env Completed in 2ms
9 timing config:load:file:/home/pi/MagicMirror/modules/MMM-Fitbit2/.npmrc Completed in 2ms
10 timing config:load:project Completed in 6ms
11 timing config:load:file:/home/pi/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 2ms
16 timing config:load:credentials Completed in 9ms
17 timing config:load:setEnvs Completed in 7ms
18 timing config:load Completed in 66ms
19 timing npm:load:configload Completed in 67ms
20 timing npm:load:setTitle Completed in 2ms
21 timing npm:load:setupLog Completed in 12ms
22 timing npm:load:cleanupLog Completed in 17ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 2ms
25 timing npm:load Completed in 113ms
26 timing config:load:flatten Completed in 18ms
27 timing arborist:ctor Completed in 5ms
28 timing idealTree Completed in 35ms
29 timing command:install Completed in 146ms
30 verbose stack TypeError: must provide string spec
30 verbose stack at new Edge (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js:48:13)
30 verbose stack at Node.[_loadDepType] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:781:9)
30 verbose stack at Node.[Arborist.Node._loadDeps] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:765:23)
30 verbose stack at new Node (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:232:20)
30 verbose stack at Arborist.[rootNodeFromPackage] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:365:18)
31 verbose cwd /home/pi/MagicMirror/modules/MMM-Fitbit2
32 verbose Linux 5.10.11-v7+
33 verbose argv “/usr/bin/node” “/usr/local/bin/npm” “install”
34 verbose node v10.23.1
35 verbose npm v7.16.0
36 error must provide string spec
37 verbose exit 1
"
Any help with the issue would be greatly appreciated thank you. -
@jjw A quick Google search for this error suggests to me that it is related to your node/npm versions, but I can’t offer any more input than that I’m afraid!
-
@vizulize No worries, thank you. :beaming_face_with_smiling_eyes:
-
@jjw looks like npm v7…
-
@sdetweil sorry for the lack of knowledge, but what does that mean/what do I have to change.
-
@jjw from the commandline do
npm install -g npm@6.14.10MAY need sudo in front if it fails for permissions error
after then check
npm -vthen redo the steps u were trying to do before
-
-
@sdetweil Thank you for your help, have the Fitbit module displaying on the monitor now, however, just says loading.:grinning_squinting_face:
-
@jjw now we need to look for messages in the place u start MM
npm start or pm2, if pm2, then the pm2 logs --lines=100 command will show
and the developers window on the MM screen
ctrl-shift-i, select the console tab, and add part of the module name to the filter field , fit -
@sdetweil I ran “pm2 logs --lines=100” in the command line and the only returns I got were for the calendar.
0|MagicMir | [05.06.2021 18:31.09.798] [INFO] Calendar-Fetcher: Broadcasting 10 events.
I’m sorry I don’t know what you mean by developer window, but when I use ctrl+shift+i out of the cmd I take a screenshot and then when I’m in the cmd I just rename the box.
-
@sdetweil I ran another test for 1000 line and the only mention of Fit is:
0|MagicMir | [05.06.2021 18:22.00.914] [INFO] Checking git for module: MMM-Fitbit2
After that, it moves onto multicast.
-
@jjw on the magicmirror screen, not commandline
press ctrl-shift-i together
a new window will open 1/2 the Mm screen
in that window there is a tabbed interface,here showing error from one of my modules, part of name in filter field

-
@sdetweil Ah, I think because I’m accessing my Pi via VNC viewer, that’s what makes it take a screenshot instead of opening that menu, even when on the MM screen, is there another way to access this? If not work directly through the Pi.
-
@jjw well, you could access from your pc, if the address/ipWhitelist settings in config.js allow it
then use chrome to view and open the dev window -
@sdetweil This is what comes up when I filter by fit

-
@jjw ok, now you know everything I know.
no errors were reported.
-
@sdetweil Thank you for the continued help, really appreciate you taking the time. One last thought, I’ve gone through the processes again, and one of the dependencies, “python-fitbit” requires you to run
sudo pip install -r requirements/base.txt
When I run this code, I get the error message
Could not open requirements file: [Errno 2] No such file or directory: ‘requirements/base.txt’
-
@jjw what folder are u supposed to be in when u run that command?
-
@sdetweil Unfortunately it doesn’t say so I’ve just tried running in and out of the Fitbit directory.
https://github.com/m-roberts/MMM-Fitbit2
redirects you to this webpage
https://pypi.org/project/fitbit/0.3.1/
and I can’t see anywhere it says what folder to install it into.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login