TypeError on startup #7223
Replies: 5 comments
-
Hum, could be related to this: lodash/lodash#5871 It links to a Fedora bug report on aarch64, and problem looks like the same, the exception is not being catched: function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
} |
Beta Was this translation helpful? Give feedback.
-
Unfortunately I know no js, so I don't know if there can be a workaround for this problem. |
Beta Was this translation helpful? Give feedback.
-
Hum, as I have 0 knowledge of NodeJS, I asked chatgpt to rewrite the function without using exceptions and it came with this: function getRawTag(value) {
var isOwn = Object.prototype.hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
var canModify = isOwn && Object.getOwnPropertyDescriptor(value, symToStringTag).configurable;
if (canModify) {
value[symToStringTag] = undefined;
}
var result = Object.prototype.toString.call(value);
if (canModify) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
} I don't know if that code is correct/safe, but tried it and now it is starting and it seems it is working great! |
Beta Was this translation helpful? Give feedback.
-
Well, did not get feedback, but I have changed the category to a bug report, since maybe it is (although I am not sure). |
Beta Was this translation helpful? Give feedback.
-
Hi, This issue has not yet been solved, each time I upgrade wiki.js, I have to apply the patch. What do I have to do to get this promoted as a bug? |
Beta Was this translation helpful? Give feedback.
-
I have installed wiki.js on a Pi4 (I'm wondering if it being ARM has something to do) and cannot get the service to start properly. These are the logs:
After a bit of googling, it looks like this happened with very old versions of node, but that's not what I am running, so I don't know what's happening.
Beta Was this translation helpful? Give feedback.
All reactions