Read the statement by Michael Teeuw here.
Cannot find module 'node-fetch' error with MMM-SoccerLiveScore
-
I don’t now, the old electron process is still running
but we now nothing, how he started, in server only or with electron, which architecture, which host os, which hardware …
-
docker run -
@sdetweil
This error only comes up when trying to restart MM inside the docker.
When restarting the docker, this error wont show up. -
@karsten13
This is a server only setup. Docker runs on “Container Manager” of Synology. The Synology is a DS420+ running on an INTEL Celeron J4025. The OS is DSM of course. -
and how do you start/stop the container? With a WebUI or per command line?
-
@karsten13 WebUI
-
@codac and I think the electron error is just noise, as you must be running server only mode, whcih doesn’t use electron
-
I don’t know this WebUI, you have to restart the container or stop and start again, whatever the WebUI provides
-
and I think the electron error is just noise, as you must be running server only mode, whcih doesn’t use electron
yes, there is no electron installed
-
@karsten13 well restarting / stopping / starting is no problem. But the error just remains and doesnt go away…
-
@codac which error? the node-fetch or the lib error?
(@karsten13 we installed electron, my mistake… in docker, doah! )
-
@sdetweil the node-fetch error
-
if you are using https://github.com/0m4r/MMM-SoccerLiveScore the module contains the missing
node-fetchso you should do agit pullin the module folder and try again (which means restart the container) -
@karsten13 did they fix the module? I didn’t check
-
you are right, they “fixed” it in
devDependenciesinstead independencies…then
git pullis 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 installis 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=productionas default in my images (expect images I use for testing) and with thisnpm installwill install nothingnpm install node-fetch@2will install nothing
so @codac please go again in the folder of the module and run
NODE_ENV=test npm install node-fetch@2this 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 vulnerabilitiesHow 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
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