-
Notifications
You must be signed in to change notification settings - Fork 60
jsctags does not work with nodejs 0.10.0 #52
Comments
sorry, that I'm not familiar with markdown yet... |
After downgrade to 0.8.22, tag show up. However, the scope of object and function is lost. |
Not sure if this will help you, but I was having the same issue. Without knowing much about the doctorjs code, it appears to be assuming this.tags is an array: [] when it hasn't been initialized. I modified /usr/local/lib/jsctags/ctags/index.js as follows: Modified the constructor for Tags to simply init: Added a tags list to the prototype setup, around lines 53-55 (may be slightly less for you due to comments): exports.Tags.prototype = Object.create(Object.prototype, Trait.compose(Trait({
And it appears to work for me with node:0.10.0 |
Thanks a lot! That worked for me too. |
Thanks, chilkari! Works fine for me. Maybe there could be some performance issue, or not. |
I don't think this issue should have been closed. The solution worked for me as well. |
This worked for me as well. |
Applied patch as described in mozilla#52.
Applied patch as described in mozilla#52.
thanks! |
Good patch though @chilkari -Thanks |
Confirmed, this works. I agree this probably shouldn't have been closed quite yet. For anyone interested, the precise changes made to the file: On line 51 exports.Tags.prototype = Object.create(Object.prototype, Trait.compose(Trait({
tags: [], // Added This
_search: function (id, pred) {
var shadowTag = { name: id };
var tags = this.tags;
var index = _(tags).sortedIndex(shadowTag, function (tag) {
return tag.name;
});
...
... Here is a sed insert if you'd rather not bother editing yourself: sudo sed -i '51i tags: [],' /usr/local/lib/jsctags/ctags/index.js |
work for me aswell :) now searching for a good vim plugin... |
it works. thanks. |
Hi.
I'm on Ubuntu. and I found a problem yesterday.
Ubuntu package manager provides nodejs 0.6.x.
I'm trying grunt 0.4.* and grunt 0.4.x needs nodejs >= 0.8.
So I've downloaded and built nodejs 0.10.x (which is official new stable version.)
Then, jsctags has broke and issued some error message complaining about
Array.prototype.push called on null or undefined
/usr/local/bin/jsctags:195
throw e;
^
TypeError: Array.prototype.push called on null or undefined
at Object.exports.Tags.Object.create.Trait.compose.Trait.add (/usr/local/lib/jsctags/ctags/index.js:71:30)
at Object.exports.Tags.Object.create.Trait.compose.Trait.scan (/usr/local/lib/jsctags/ctags/index.js:105:14)
at processPath (/usr/local/bin/jsctags:189:18)
at Object. (/usr/local/bin/jsctags:207:5)
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)
at startup (node.js:119:16)
I figured a workaround for this situation.
maybe you need to sudo n use 0.8.22 to make 0.8.22 default. I'm not quite familiar with 'n'.
and when you get "node -v" "0.8.22". All problem solved for me.
Still, I think it would be better for jsctags work with node 0.10.x.
Thank you.
The text was updated successfully, but these errors were encountered: