-
Notifications
You must be signed in to change notification settings - Fork 4
Cannot read property 'charAt' of undefined #8
Comments
well, the first thing to do is tell me exactly where the Post a stack trace please. |
Yes, sorry for neglecting that, here it is.
|
(And if I'd figured out how to get the stack trace earlier, I could probably have narrowed in on the right package to back out. Live and learn.) |
i have reproduced it but it's a strange one as the dc.js docs render fine if processed directly with i'm pretty sure this is an npm/dependency-resolution issue, rather than dc.js docs or jsdoc2md code.. will see. |
it's something to do with npm.. if i reduce your dev-deps to this, so only these two deps are installed:
and your gruntfile to this
and run |
Ugh, that's horrible. Thanks for doing the detective work! I'm not sure if this is the kind of thing I can troubleshoot. I'm used to weird side-effects in C++ but can't see why that would happen in JavaScript. |
yeah, it's not suppose to happen - it's an npm bug.. i'll probably have a deeper look tonight.. |
i've traced the problem to this issue, in a different module (not one that my tools use).. the problem is the offending module overwrites the global i'll try to find out which other module is using this broken one.. |
i found the offending plugin which pulls in the broken "collections" module - grunt-gh-pages. remove it ( |
your grunt stack is getting old, you need to keep your dependencies up to date.. |
Ugh. Yes, clearly we need to. Or just shrink-wrap the whole thing so that our build doesn't break without us touching it. Thank you so much for tracking this down. I would not have thought that it was someone screwing with |
you don't need to shrinkwrap, you are already (unwittingly) doing it - most of your dep versions are fixed.. e.g. the semver expression "~0.10.1" is fixed at version 0.10.1, no room for movement.. run besides, shrinkwrapping is not the answer - all you do is lock the bugs in.. we have found a bug in your version of |
I am aware of that. I was trying to say that there are two choices - either roll with all the changes in the npm ecosystem, or nail everything to the floor (including transitive dependencies). We are doing something in between, and apparently in this case a loose constraint in jsdoc-to-markdown allowed dmd to upgrade and that exposed a bug in a package it doesn't even know about. I agree that the more responsible thing to do is to loosen our dependencies and allow other packages to upgrade. But this would mean we would break even more often, and honestly I don't have time for that, so I was just whining that I should nail everything to the floor. But I'm just whining and of course I'll just get some sleep and upgrade the dependency instead. 😊 A million thanks! |
apologies, on closer inspection there is room for movement in most of your devDependency semver expressions, so shrinkwrapping would make a difference.. yes, you could nail modules down until you get round to reviewing your build stack.. you're welcome, let me know if there are any more issues. |
Hi @75lb!
A user reported that our dc.js docs build broke: dc-js/dc.js#1142
The docs were building fine for months, but as often happens, if you a fresh install, then some npm dependency somewhere updates and whamo.
I know the problem is deeper than grunt-jsdoc-to-markdown, but I'm not sure where to file it. It appears to be deeper than jsdoc-to-markdown, and I tried to diagnose it further using npm-shrinkwrap.json, but backing out jsdoc-to-markdown and jsdoc-parse didn't help, so I'm asking for help in case you might have seen this.
It's reproduceable by checking out dc.js and doing
npm install && grunt docs
. I'll gladly close this if you can point me to a better way to diagnose this!It is very likely that we have invalid jsdoc somewhere in our extensive corpus.
The text was updated successfully, but these errors were encountered: