creationix/http-parser-js

Fix for module not found issue

paulbjensen opened this issue · 3 comments

Hi,

Yesterday we ran into a Module not found: 'http-parser-js' error with this library.

I managed to replicate the issue on Linux (the original error was happening on Heroku), and discovered that npm install was not installing the http-parser.js file. I then tried to install previous versions of the library to isolate the cause of this, and found that this commit was where that issue was occurring:

0bd74fd

It looks like on older versions of npm, the files property in the package.json was an empty array, so only the package.json and README.md files were being installed, and not the http-parser.js (even though it is referenced in the main property).

I added the reference in the files property, and the issue was fixed.

I'm not sure http-parser-js will work on that old of Node (you mentioned 0.8.7 in the other issue), as it's closely tied to the internals, though depending on how it's used it might work fine. I've re-added the entries to files[] in package.json in #42, if that looks sufficient and it passes tests, I'll go ahead and merge it, seems like it shouldn't harm anything.

Published to NPM as v0.4.7

@Jimbly Thank you for making the PR and publishing the update.