Read the statement by Michael Teeuw here.
Cannot find module 'node-fetch' error with MMM-SoccerLiveScore
-
you are right, they “fixed” it in
devDependencies
instead independencies
…then
git pull
is useless, you have to install the missing library in the module folder as sam already explained above -
-
@KristjanESPERANTO well, npm install would have installed the devDependencies too…
-
@sdetweil Sure. But my PR removes node-fetch, so
npm install
is no longer necessary for this module. -
well, npm install would have installed the devDependencies too…
This sentence clicked in my brain.
I have
NODE_ENV=production
as default in my images (expect images I use for testing) and with thisnpm install
will install nothingnpm install node-fetch@2
will install nothing
so @codac please go again in the folder of the module and run
NODE_ENV=test npm install node-fetch@2
this should hopefully solve the issue
-
@karsten13
@codac said in Cannot find module 'node-fetch' error with MMM-SoccerLiveScore:root@04492d039b9f:/opt/magic_mirror/modules# cd MMM-SoccerLiveScore root@04492d039b9f:/opt/magic_mirror/modules/MMM-SoccerLiveScore# npm install node -fetch@2 up to date, audited 1 package in 1s found 0 vulnerabilities
How would I restart MM of the container?
pm2 is not set up.DISPLAY=:0 npm restart
…results in
> magicmirror@2.26.0 restart > npm stop --if-present && npm start > magicmirror@2.26.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js sh: 1: ./node_modules/.bin/electron: not found
-
@karsten13 said in Cannot find module 'node-fetch' error with MMM-SoccerLiveScore:
NODE_ENV=test npm install node-fetch@2
I could see that this time node-fetch got installed (different than before running npm install node-fetch@2 only).
But after restarting the docker container, the same error remained. -
did the same and it works, so no idea anymore
-
@karsten13 your are right… somehow the docker didn’t keep the installation after first try.
After installing it a second time and restarting the docker afterwards, the container kept the installation of node-fetch. Its working now.Thank you guys for your massive support. Big time!
@karsten13, @sdetweil, @KristjanESPERANTO -
@KristjanESPERANTO thank you!
…and apologies for missing the whole discussion, I have updated my preferences to get e-mails when someone mentions me :)