master117 / MagicMirror-FootballLeagues

A live viewer for recent soccer results and league tables. Outdated!
GNU General Public License v3.0
8 stars 5 forks source link

Errors while installing, not working. Any solution? #4

Closed ggashion closed 6 years ago

ggashion commented 6 years ago

Hi,

I tried installing this module and get these errors;

npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json' npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/node_modules/node_helper/package.json' npm WARN modules No description npm WARN modules No repository field. npm WARN modules No README data npm WARN modules No license field.

Is there a way to fix it?

master117 commented 6 years ago

These sound like bugs unrelated to this project (MagicMirror-FootballLeagues), and rather like bugs in Magic Mirror or your installation of it. None of the files mentioned in the message are part of this project.

Can you install other modules and maybe describe your installation steps so I can assure everything is right with that?

ggashion commented 6 years ago

I only get this error, when trying to install this module.

master117 commented 6 years ago

Ok, lets see.

npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json' 
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/node_modules/node_helper/package.json'
npm WARN modules No description
npm WARN modules No repository field.
npm WARN modules No README data
npm WARN modules No license field.

are warnings (WARN) not errors (ERR) and normally don't affect install behaviour. These do not affect functionality of the module.

I assume you get these warning when running:

npm install request

is that correct? The warning says that you are missing package.json

You can try:

npm init

in case you don't have a package.json file anywhere. as seen here: https://stackoverflow.com/questions/45531633/npm-warn-enoent-enoent-no-such-file-or-directory-open-c-users-nuwanst-packag

or here: https://stackoverflow.com/questions/31952747/npm-throws-enoent-warnings-on-every-install-uninstall-ls

This warning is very common and should not matter for running this module. To see if request is installed you can try:

npm view request version

Which should return the installed request version. Request is a near standard package and not made by me, there is a good chance you have a problem in your npm configuration somewhere, or this may even be intentional, its just a warning after all. I hope this helps fix those warnings for you.


You opened an issue for this, is the module itself working? If not, feel free to describe your steps and post your config.

ggashion commented 6 years ago

Hi, Thank you for replying. I know i have a package.json file in MagicMirror folder, and its not empty.

I tried npm view request version

and got: 2.85.0

master117 commented 6 years ago

That means you have installed request, so everything is ready for this module. The warnings above did not create any problems. If you want to get rid of the Warnings you will have to look around, maybe npm init works, maybe not.

You opened an issue for this, is the module itself working? If not, feel free to describe your steps and post your config.

ggashion commented 6 years ago

Hi,

Steps are the ones u have instruct. config code: { module: 'MagicMirror-FootballLeagues', position: 'bottom_center', header: 'Live-Scores', config: { leagues: [445, 455, 464, 456, 450], showNames: true, displayTime: 60 * 1000, showTables: true, showLogos: true, apiKey: 'MySecretApiKey' } },

And it wont show on my mirror.

pcwinn commented 6 years ago

I have the same problem with @ggashion @master117 . I already did for apiKey. This is my config code: { module: 'MagicMirror-FootballLeagues', position: 'middle_left', header: 'Live-Scores', config: { leagues: [445], showNames: true, displayTime: 60 * 1000, showTables: true, showLogos: true, apiKey: '---------------------------------' } My mirror doesn't pop up table or result. Please you kindly advise.

master117 commented 6 years ago

Hello @pcwinn,

does the magic mirror show that Football Lueages is loaded on startup? Like this:

https://i.imgur.com/6DQieMr.png

What does the browser console contain, does it say anything about it? It should look like this:

https://i.imgur.com/xq1LeLc.png

Note, you can open the browser console with F12 in most browsers and then clicking on console.

master117 commented 6 years ago

My current config looks like this, which seems to be similar to yours, except its missing the header and showLogos fields, shouldn't cause a problem tho.

    {
        module: "MagicMirror-FootballLeagues",
        position: "top_right",          
        config: {
            apiKey : 'xx',
            leagues : [450],
            displayTime: 60 * 1000,
            showTables: true,
            showNames: true,
        }
    },

ShowLogos is on by default btw.

master117 commented 6 years ago

I found the error! @ggashion @pcwinn , the git repository was one folder too deep, It was MagicMirror/MagicMirror/Code instead of MagicMirror/Code. I have fixed this. Please pull the newest version and try again. You pull by going into the magic mirror folder (where .git is) and:

git pull

You filestructure afterwards should be:

MagicMirror |-modules --|-MagicMirror-FootballLeagues ----|-MagiccMirror-FootballLeagues.js ----|-moment.js ----|-node_helper.js file |-config --|-config.js

I hope this works for you guys.