codetheweb / MMM-AnyList

Magic Mirror module to display AnyList data
11 stars 4 forks source link

Most recent update broke the magic mirror #9

Closed Srcodesalittle closed 4 years ago

Srcodesalittle commented 4 years ago

Not too sure what happened but I updated the module this morning and ever since, my magic mirror has just been a blank screen with a pointer in it. Disabling the module in the config file allows mirror to function again. Please advise. Thanks.

codetheweb commented 4 years ago

There was a recent update but I can't think of what that would have broke. Another user reported that the update worked for them.

Is there anything helpful in the server or web browser logs?

Srcodesalittle commented 4 years ago

Thanks for getting back so quickly. Ok, I just started in dev mode and noticed the following errors

WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'async/queue'
Require stack:
- /home/pi/MagicMirror/modules/MMM-AnyList/node_helper.js
- /home/pi/MagicMirror/js/app.js
- /home/pi/MagicMirror/js/electron.js
- /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
- 

Which is weird because all these files are present in the specified locations. The config file also works fine when I disable the Anylist module, so it's not a syntax error or something.

codetheweb commented 4 years ago

Oh, it looks like you forgot to run npm i in the module folder after updating the module. I added a package.

Srcodesalittle commented 4 years ago

OK, I did that but I'm still getting the same issue and same error logs. I can dump the entire contents of running dev if that will help? Let me know.

codetheweb commented 4 years ago

That should have fixed it. Can you post the output of pwd && npm i when you try to install the module's dependencies?

gpop-arcadia commented 4 years ago

I had the same problem and was able to resolve it by running:

npm cache verify; npm update

in ~/MagicMirror/modules/MMM-AnyList

Srcodesalittle commented 4 years ago

That totally solved the problem. Thank you very much for the info!

68267a commented 4 years ago

I don't mean to reopen this but I wanted to post here for anyone that might have this same issue because it could apply to other modules as well:

[2020-11-29 11:59:45.735] [ERROR]  { Error: Cannot find module 'anylist'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-AnyList/node_helper.js:2:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)