webpro / dyson

Node server for dynamic, fake JSON.
836 stars 61 forks source link

Updating/Installation now fails at mmmagic@0.2.5 dependency package update! #7

Closed sc0ttwad3 closed 11 years ago

sc0ttwad3 commented 11 years ago

This is such a great tool and one I'm often finding new uses for in my testing.

I hadn't checked for updates in awhile since Dyson has been working great without any major issues, but this evening I decided to update it and performed a routine:

$ npm update -g dyson

But, now I'm runing into a build error when the mmmagic dependency is "updated/installed" to mmmagic@0.2.5. The exact error followed by other specifics are below.

I've even tried a complete removal and attempted fresh installation of dyson, but as with the update, it fails at the mmmagic@0.2.5 dependency.

Anyone else running into this issue?

gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\swade\AppData\Roaming\npm\node_modules\dyson\node_modules\dyson-image\node_modules\mmmagic
gyp ERR! node -v v0.8.19
gyp ERR! node-gyp -v v0.8.4
gyp ERR! not ok

npm ERR! mmmagic@0.2.5 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the mmmagic@0.2.5 install script.
npm ERR! This is most likely a problem with the mmmagic package,
npm ERR! npm -v 1.2.10
webpro commented 11 years ago

Hi @sc0ttwad3, thanks for your feedback.

What happened is that I added support for serving dummy images (incl. base64 strings), in a separate dyson-image module. What I will try to do is to make this optional. Not sure how yet, but we'll see. I'm mobile now, will get back to this later today. In the meantime, you're probably best of by using an older version of dyson, or comment out related lines in dyson.js (it's not much).

sc0ttwad3 commented 11 years ago

@webpro, thanks for the quick response...

Making the dummy image provider an optional service/module does sound like a good approach. Look forward to it.

In dyson.js, commenting out the dyson-image module require...

// image = require('dyson-image');

and the registration with Express

// Register the image service
// util.log('Registering GET service at /image');
// app.get('/image/*', image.asMiddleware);

would avoid the dyson-image module for now during execution...

However, the problem I'm running into, is the dyson dependency on dyson-generators which itself has the dependency on dyson-image which has the dependency on the problematic mmmagic@0.2.5 which is the package actually failing to install under Windows during the npm package installation/update of dyson.

No way to easily comment out the related multi-level dependent code between modules/packages to avoid the package where the problem actually lies, mmmagic@0.2.5, unless I'm missing something simpler?

I'm going to revert back to an earlier version for now...

webpro commented 11 years ago

Sorry for the delay, yesterday there was an issue at npm.

Can you try again please? I published v0.1.1 for dyson and dyson-image. The "mmmagic" dependency is now optional, so it shouldn't fail installation anymore, while "node-ee-mime-magic" is added as a fallback.

Would really like to get your feedback, since I cannot really test this installation failure scenario reliably myself.

webpro commented 11 years ago

@sc0ttwad3, I'm closing this ticket. Please re-open if the issue is not fixed for you.