qistoph/MMM-MyCommute

Bug: No longer works with MM 2.20 and can't add request module

fribse opened this issue · 1 comments

Describe the bug
MMM-MyCommute will no longer start, and shows error.

To Reproduce
Steps to reproduce the behavior:

  1. Old install of MagicMirror with MMM-MyCommute module active
  2. Upgrade to MM 2.20
  3. Restart MagicMirror
  4. Black screen

Expected behavior
It should show as normal.

Screenshots

Running version

Additional context

-
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at n._resolveFilename (node:electron/js2c/browser_init:245:1105)
    at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-MyCommute/node_helper.js:9:17)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
[31.08.2022 06:55.06.806] [ERROR] Whoops! There was an uncaught exception...
[31.08.2022 06:55.06.822] [ERROR] Error: Cannot find module 'request'
Require stack:
- /home/pi/MagicMirror/modules/MMM-MyCommute/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
-
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at n._resolveFilename (node:electron/js2c/browser_init:245:1105)
    at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-MyCommute/node_helper.js:9:17)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/pi/MagicMirror/modules/MMM-MyCommute/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',
    undefined
  ]
}

I tried installing request module, but that also errored out:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mmmmycommute@1.1.0
npm ERR! Found: stylelint@9.10.1
npm ERR! node_modules/stylelint
npm ERR!   dev stylelint@"^9.10.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer stylelint@"^13.8.0" from grunt-stylelint@0.16.0
npm ERR! node_modules/grunt-stylelint
npm ERR!   dev grunt-stylelint@"^0.16.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/pi/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2022-08-31T08_36_52_542Z-debug-0.log

Duplicate of #28