AriaMinaei / pretty-error

See node.js errors with less clutter
MIT License
1.52k stars 48 forks source link

Error caused by renderkid@0.2.0-beta.11 #13

Closed danielscw closed 9 years ago

danielscw commented 9 years ago

After reinstall the pretty-error module and upgrade renderkid from 0.2.0-beta.10 to 0.2.0-beta.11, we got the following error.

module.js:340
    throw err;
    ^
Error: Cannot find module './block/config'
    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> (/opt/app/node_modules/pretty-error/node_modules/renderkid/lib/layout/Block.js:4:15)
    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 Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/opt/app/node_modules/pretty-error/node_modules/renderkid/lib/Layout.js:4:9)

Downgrade the renderkid module solve the problem.

floross commented 9 years ago

+1

whyhankee commented 9 years ago

+1, on node v0.10.33

robertmain commented 9 years ago

Yep, broken here too. It just made a massive clusterfuck of my dev environment. Why is renderkid beta included in what should(according to semver) be a stable release?

AriaMinaei commented 9 years ago

Have seen this weird bug before. For some reason, the last prepublish script had compiled src/layout/block/config.coffee to src/layout/block/Config.js (config vs Config).

Funny enough, the file is actually named config.coffee, both in git and in my local copy.

Anyway, it looks like my last npm publish for some reason contained a Config.js instead of config.js, and after that, well, all hell broke loose.

This wasn't caught by RenderKid's travis, because travis reads files from git and not from npm, and git's files were actually correct. The only way to know things didn't work was to re-run pretty-error's test-cases again on travis, and that didn't occur to me because RenderKid's test-cases were passing.

I just pushed a dumb new version with a fixed filename and now it looks like pretty-error's cases are passing now.

Why is renderkid beta included in what should(according to semver) be a stable release?

You are right. pretty-error is stable and it should depend on stable packages. But RenderKid has been stable ever since pretty-error became stable. I just didn't reflect that in its version string.

robertmain commented 9 years ago

Ah, Gotcha! :-) On 17 Feb 2015 16:37, "Aria" notifications@github.com wrote:

Have seen this weird bug before. For some reason, the last prepublish script had compiled src/layout/block/config.coffee to src/layout/block/Config.js (config vs Config).

Funny enough, the file is actually named config.coffee, both in git and in my local copy.

Anyway, it looks like my last npm publish for some reason contained a Config.js instead of config.js, and after that, well, all hell broke loose.

This wasn't caught by RenderKid's travis, because travis reads files from git and not from npm, and git's files were actually correct. The only way to know things didn't work was to re-run pretty-error's test-cases again on travis, and that didn't occur to me because RenderKid's test-cases were passing.

I just pushed a dumb new version with a fixed filename and now it looks like pretty-error's cases are passing now.

Why is renderkid beta included in what should(according to semver) be a stable release? You are right. pretty-error is stable and it should depend on stable packages. But RenderKid has been stable ever since pretty-error became stable. I just didn't reflect that in its version string.

— Reply to this email directly or view it on GitHub https://github.com/AriaMinaei/pretty-error/issues/13#issuecomment-74699372 .