8

JavaScript libs have a massive problem with quality and especially with quality of documentation and error reporting

For the entire day I've been staring at this stupid error and can't figure it out. The documentation stating that the source function sets the source dir, but not actual saying what 'source dir' means or what paths are resolved against it is no help either

npm is actually really awesome but almost every library I've tried just fucking sucks

Comments
  • 1
    Oh and that handy-dandy help link has this to say which is no help either
  • 3
    take a nap, maybe it's just a missing semicolon and after waking up again you find a new perspective on the problem. 🙂
  • 0
    did you install the jstransformers? b/c you know do know they aren't installed automatically.

    where are the required files relative to the main script?

    where are the required files relative to the module in question?

    check again it's not a permissions issue

    load up an example that *already* works, look at the difference between your code and the example to see if anything stands out.

    lot of debugging comes down to debugging your *knowledge* of the language/library/etc

    also I'd take a dozen extra glances at https://github.com/metalsmith/... in particular the section under 'pattern', which says "only files that match this pattern will be processed", so if a property is missing from for example metalsmith.json, or it's in the wrong order maybe, or theres a ',' missing somewhere, it may be detecting no files at all.

    Put in a try/catch or someshit to confirm the files are even existing. If not, then you know they're probably being skipped by metalsmith or somesuch
Add Comment