Comments (5)
Thank you, the updated version works as intended !
from mm-hsl-timetable.
Thanks :)
I have this running on my mirror, but it's years since I've done a fresh install. Probably the request npm module was available through MagicMirror base dependencies but might have been removed from them since.
Looks like there's no package.json for modules. There's a chance that this could be fixed by adding "request" to https://github.com/MichMich/MagicMirror/blob/master/package.json dependencies. But there's probably a reason why it was removed so a more proper fix would be migrating away from it on my module as well.
Not promising anything, but I might take a look at this at some point :)
from mm-hsl-timetable.
Hi,
I have same issue as pixel-lake. Here is my errorcode:
[13.04.2022` 21:53.58.164] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'request' Require stack: - /home/magicmirror/MagicMirror/modules/mm-hsl-timetable/node_helper.js - /home/magicmirror/MagicMirror/js/app.js - /home/magicmirror/MagicMirror/js/electron.js - /home/magicmirror/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - [13.04.2022 21:53.58.167] [ERROR] App threw an error during load [13.04.2022 21:53.58.167] [ERROR] Error: Cannot find module 'request' Require stack: - /home/magicmirror/MagicMirror/modules/mm-hsl-timetable/node_helper.js - /home/magicmirror/MagicMirror/js/app.js - /home/magicmirror/MagicMirror/js/electron.js - /home/magicmirror/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - at Module._resolveFilename (node:internal/modules/cjs/loader:940:15) at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1105) at Function.Module._resolveFilename (/home/magicmirror/MagicMirror/node_modules/module-alias/index.js:49:29) at Module._load (node:internal/modules/cjs/loader:785:27) at Function.c._load (node:electron/js2c/asar_bundle:5:13331) at Module.require (node:internal/modules/cjs/loader:1012:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/home/magicmirror/MagicMirror/modules/mm-hsl-timetable/node_helper.js:2:17) at Module._compile (node:internal/modules/cjs/loader:1116:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10) [13.04.2022 21:53.58.168] [ERROR] Whoops! There was an uncaught exception... [13.04.2022 21:53.58.169] [ERROR] Error: Cannot find module 'request' Require stack: - /home/magicmirror/MagicMirror/modules/mm-hsl-timetable/node_helper.js - /home/magicmirror/MagicMirror/js/app.js - /home/magicmirror/MagicMirror/js/electron.js - /home/magicmirror/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - at Module._resolveFilename (node:internal/modules/cjs/loader:940:15) at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1105) at Function.Module._resolveFilename (/home/magicmirror/MagicMirror/node_modules/module-alias/index.js:49:29) at Module._load (node:internal/modules/cjs/loader:785:27) at Function.c._load (node:electron/js2c/asar_bundle:5:13331) at Module.require (node:internal/modules/cjs/loader:1012:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/home/magicmirror/MagicMirror/modules/mm-hsl-timetable/node_helper.js:2:17) at Module._compile (node:internal/modules/cjs/loader:1116:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/magicmirror/MagicMirror/modules/mm-hsl-timetable/node_helper.js', '/home/magicmirror/MagicMirror/js/app.js', '/home/magicmirror/MagicMirror/js/electron.js', '/home/magicmirror/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js', undefined ] } [13.04.2022 21:53.58.170] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [13.04.2022 21:53.58.170] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
from mm-hsl-timetable.
Thanks :)
I have this running on my mirror, but it's years since I've done a fresh install. Probably the request npm module was available through MagicMirror base dependencies but might have been removed from them since.
Looks like there's no package.json for modules. There's a chance that this could be fixed by adding "request" to https://github.com/MichMich/MagicMirror/blob/master/package.json dependencies. But there's probably a reason why it was removed so a more proper fix would be migrating away from it on my module as well.
Not promising anything, but I might take a look at this at some point :)
I (really my friend @viljamip) got this module working with this tip! Here is how:
-
Stop magicmirror if running.
-
Edit package.json file with your preferred editor. You can find it in the root of magicmirror. Find "dependencies" and add request like this:
"dependencies": {
"colors": "^1.4.0", "console-stamp": "^3.0.4", "digest-fetch": "^1.2.1", "eslint": "^8.12.0", "express": "^4.17.3", "express-ipfilter": "^1.2.0", "feedme": "^2.0.2", "helmet": "^5.0.2", "iconv-lite": "^0.6.3", "luxon": "^1.21.3", "module-alias": "^2.2.2", "moment": "^2.29.2", "node-fetch": "^2.6.7", "node-ical": "^0.15.1", "socket.io": "^4.4.1", "request": "^2.88.2" <-----------------------------
Save the file.
- Install request.
npm install request
- Start magicmirror and it should work now.
It seems that request is deprecated. Here is more info about that #request/request#3142
It also seems that magicmirror uses now Node-fetch instead.
Thank you @ZakarFin for this module!
from mm-hsl-timetable.
Updated the code to use node-fetch instead. Let me know if you have further issues with this.
from mm-hsl-timetable.
Related Issues (4)
- Thoughts HOT 5
- Wont work HOT 2
- Create package.json HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mm-hsl-timetable.