jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 243 forks source link

Opening the Plugins app throws exception #197

Closed matita closed 9 years ago

matita commented 9 years ago

After searching the plugins the server crashes logging this error:

mediacenterjs-plugin-generator  MediacenterJS plugin generator
       =terrymooreii  2013-11-16 0.0.3   mediacenterjs plugin generator

mediacenterjs-soccer            Watch streaming soccer
       =pocketjake    2014-05-04 0.0.3   soccer streaming mediacenterjs nodejs

mediacenterjs-spotify           WIP (Experimental): A Spotify app for Mediacente
rJS..  =jansmolders86 2014-11-28 0.0.5   mediacenterjs spotify

C:\matteo\MediacenterJS\apps\plugins\plugins-functions.js:108
                    author: pluginObj.maintainers[0].replace('=',''),
                                                 ^
TypeError: Cannot read property '0' of undefined
    at C:\matteo\MediacenterJS\apps\plugins\plugins-functions.js:108:50
    at Array.map (native)
    at C:\matteo\MediacenterJS\apps\plugins\plugins-functions.js:100:14
    at C:\matteo\MediacenterJS\apps\plugins\plugins-functions.js:81:25
    at C:\matteo\MediacenterJS\node_modules\npm\lib\search.js:56:5
    at C:\matteo\MediacenterJS\node_modules\npm\lib\search.js:71:14
    at C:\matteo\MediacenterJS\node_modules\npm\node_modules\npm-registry-client
\lib\get.js:103:14
    at C:\matteo\MediacenterJS\node_modules\npm\node_modules\graceful-fs\gracefu
l-fs.js:102:5
    at Object.oncomplete (evalmachine.<anonymous>:108:15)

After modifying that row in

author: pluginObj.maintainers &&
                        pluginObj.maintainers[0] &&
                        pluginObj.maintainers[0].replace('=','') ||
                        '---',

it doesn't throw error but all the plugins have the metadata row displayed as by --- added NaN-NaN-NaN

jansmolders86 commented 9 years ago

I think NPM has maybe changed the way it serves it's metadata. I'll investigate! thanks!

jansmolders86 commented 9 years ago

Hey there, been trying to reproduce this issue without any luck. Which version of node are you using?

matita commented 9 years ago
node -v
v0.10.36

npm -v
1.4.28

On Windows 7 64bit

jansmolders86 commented 9 years ago

ah, I'm still running 0.10.31. I'll upgrade and check again. Thanks!

jansmolders86 commented 9 years ago

Fixed this issue :) NPM changed their JSON in the new veriosn