babel-core directly imports debug/node. However, this export was removed in 2.5.0.
You can reproduce the issue with this repo. The following error is shown:
ERROR in Cannot find module 'debug/node'
please fix it immediately.
Just pushed 2.5.1. However, babel-core shouldn't be consuming node directly. That was the point of the index.js in previous versions. Will file an issue there
Can you confirm https://github.com/visionmedia/debug/blob/master/node.js
@mking-clari @maxzhang
It seem work fine. Thanks.

babel-core use debug ^2.1.1.......
Well that was fun. I submitted an issue over there. Not sure why the folks at babel were referencing internal src files haha
Everything that's reachable is part of the public API, documented or not. Thanks for the quick fix!
@ljharb no problem, but I don't agree that every single source file is part of the "public API". If that is the case, then there is no private API in any codebase. The point of the index file was to delegate between node and browser
Indeed, that's accurate - unless you only distribute bundle files (one for each entry point you want to preserve) or use closure encapsulation, there's no private APIs in any codebase. It's a reasonable compromise, however, to only consider all top-level entry points automatically public, and to treat nested entry points as public only when documented.
That makes sense, but I think in this case the problem was a bit simpler than that. See this. Looks like babel-core had an issue with debug choosing the wrong environment but I don't think an issue was ever submitted about it :(
@thebigredgeek Exceptional work on the really fast fix and publish - thank you for dedicating your time and efforts to the project that we all rely on 馃憤
Hi,
I experienced the same thing with debug/browser. It was working up until the code was moved to the src directory - so it was working with version 2.4.5 - in 2.5.0 it is broken. Please add a file called browser.js in the main directory with the content
module.exports = require('./src/browser');
Thanks!
@gurkerl83 try v2.5.1
Most helpful comment