aredridel / html5

Event-driven HTML5 Parser in Javascript
http://dinhe.net/~aredridel/projects/js/html5/
MIT License
590 stars 168 forks source link

can't load v0.4.0 #105

Closed msridhar closed 10 years ago

msridhar commented 10 years ago

Our rewriting-proxy project depends on html5. When doing a fresh install today, which pulled v0.4.0 of html5 from npm, even the following simple code doesn't work:

var HTML5 = require('html5');

The package.json just has:

    "dependencies" : {
    "html5": "*"
    }

When I run the above code, I get:

module.js:340
    throw err;
          ^
Error: Cannot find module 'html5'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/m.sridharan/git-repos/rewriting-proxy/foo.js:1:75)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

Asssuming this is in fact a bug, can it be fixed soon and a new version pushed to the npm registry? If not, we'll have to push a new version of our package that depends on 0.3.x. Thanks!

aredridel commented 10 years ago

Well, if you depend on 0.3.x, depend on 0.3.x! The version was bumped because there's potentially breaking changes!

aredridel commented 10 years ago

Also, getting that error shows that something went wrong earlier in the install process.

I'd love to know if your code breaks on 0.4.x, but '*' dependencies are wrong, always. 0.x is unstable anyway, but in general, you can't depend on it that way and have it stay working. HTML5 is a semver module.

aredridel commented 10 years ago

Let me know if you need me to dive in further; I'll reclose this if I don't hear back later.

aredridel commented 10 years ago

Oh! The main entry point was moved in that last merge. There's a new entry point, but it's definitely not backward compatible. You'll need to fix your deps against 0.3.x if you want to keep that interface.

msridhar commented 10 years ago

Hi, we'll fix our dependence at 0.3.x for now then, thanks! I'll also look into how the interface has changed.

aredridel commented 10 years ago

Awesome. And thanks for the heads up that v0.4.0 was missing its main entry point. Total doh moment there.