A Programming “20 Minute Challenge”, NodeJS, VS Code, Project Oxford

So I tried a “20 Minute” challenge on my macbookpro and entered hell. The Project Oxford API was not responding when I ran it.
Problem with my tool installation, cialis buy firewall, cialis sales them? Who knows?
So I dug into the installation logs and found a problem with a missing file from the installation of the dependencies for the project. Not saying this was the problem, but it had a big smell about it.
Tried to Full Stack Overflow my way out of it, but didn’t find much.
This challenge may work on a clean machine that isn’t used for daily hacking but my machine was not that machine.
I tried using my Windows 10 image but hit hurdles trying to follow their instructions.
So I was going to have to understand the problem. Back to the mac.
Cloned NodeJS/Node from Github to copy the supposed missing file to the place it was missing. I sensed a bigger issue in the configuration for the mac but I was too much a noob to Nodejs to know better.
That caused trouble:
npm install —save  in the project directory
? bobblegit:(master)?npm install --save gifencoder
bobble@0.0.0 /Users/mo/Dev/node/bobble
??? gifencoder@1.0.6
?  bobblegit:(master) ? npm install --save jimp      
> node-zlib-backport@0.11.15 install /Users/mo/Dev/node/bobble/node_modules/node-zlib-backport
> node-gyp rebuild
  CXX(target) Release/obj.target/zlib/src/node_zlib.o
In file included from ../src/node_zlib.cc:32:
/Users/mo/.node-gyp/5.11.0/include/node/node_internals.h:6:10: fatal error: 'util-inl.h' file not found
#include "util-inl.h"
         ^
1 error generated.
make: *** [Release/obj.target/zlib/src/node_zlib.o] Error 1
gypERR!build error
gypERR!stack Error: `make` failed with exit code: 2
gypERR!stack    at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gypERR!stack    at emitTwo (events.js:100:13)
gypERR!stack    at ChildProcess.emit (events.js:185:7)
gypERR!stack    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gypERR!System Darwin 15.4.0
gypERR!command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gypERR!cwd /Users/mo/Dev/node/bobble/node_modules/node-zlib-backport
gypERR!node -v v5.11.0
gypERR!node-gyp -v v3.3.1
gypERR!not ok
npmWARNinstall:node-zlib-backport@0.11.15 node-zlib-backport@0.11.15 install: `node-gyp rebuild`
npmWARNinstall:node-zlib-backport@0.11.15 Exit status 1
bobble@0.0.0 /Users/mo/Dev/node/bobble
??? jimp@0.2.22

sudo didn’t help either.
Led to here:
This led to:
npmERR! node-zlib-backport@0.11.15 install: `node-gyp rebuild`
npmERR! Exit status 1
npmERR!
npmERR! Failed at the node-zlib-backport@0.11.15 install script 'node-gyp rebuild'.
npmERR! Make sure you have the latest version of node.js and npm installed.
npmERR! If you do, this is most likely a problem with the node-zlib-backport package,
npmERR! not with npm itself.
npmERR! Tell the author that this fails on your system:
npmERR!    node-gyp rebuild
npmERR! You can get information on how to open an issue for this project with:
npmERR!    npm bugs node-zlib-backport
npmERR! Or if that isn't available, you can get their info via:
npmERR!    npm owner ls node-zlib-backport
npmERR!There is likely additional logging output above.

Created a Node Azure machine hoping for better luck. Not so.
Tried on Azure Windows 10, got an InvalidImageSize error.
Tried on mac and parallels Windows 10, and got timeout.
Installed Node 6 on mac that was just released yesterday.
Redid installation of node, express, etc. on mac:
InvalidImageSize error on different images sizes and types.
“Image size is too small or too big.”
This was progress. Going from timeout to error is a big gain.
Apparently if I can send an http path instead of local image path, this bug won’t occur. Couldn’t get it to work without changing too much code for a 20 minute challenge. Put on the back burner.
Also, apparently if I put a .jpg on the end of the file that gets sent to Project Oxford, it will work. Not so.
I subscribed to two bug reports on github for the next move and am now waiting…
Apparently the problem was a regression issue where streaming no longer recognised the file type from the stream contents. Local file names without an extension that gave the game away with respect to the type of file now cause a problem. Not sure if that covers the problems I have experienced, though.
A pull request to fix the issue has been submitted. Stay tuned.

One thought on “A Programming “20 Minute Challenge”, NodeJS, VS Code, Project Oxford”

  1. Success!

    I removed version 6.0.0 or Node and installed an earlier LTS version 4.4.3, even though the instructions said to use “Node.js v5.x (use the latest stable Node.js release)”

    The project was complete in the 20 Minutes they said it would 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *


*