console-highlight
console-highlight copied to clipboard
Cannot set property length of [object Object] which has only a getter
I performed these steps:
git clone https://github.com/dtao/console-highlight.git
cd console-highlight
npm install
node test.js
And this is my output:
/path/to/console-highlight/node_modules/jsdom/lib/jsdom/level1/core.js:553
Array.prototype.splice.call(this._childNodes, refChildIndex, 0, newChild);
^
TypeError: Cannot set property length of [object Object] which has only a getter
at core.Node.insertBefore (/path/to/console-highlight/node_modules/jsdom/lib/jsdom/level1/core.js:553:30)
at null.<anonymous> (/path/to/console-highlight/node_modules/jsdom/lib/jsdom/level2/events.js:332:20)
at proto.(anonymous function) [as insertBefore] (/path/to/console-highlight/node_modules/jsdom/lib/jsdom/utils.js:23:26)
at core.Node.appendChild (/path/to/console-highlight/node_modules/jsdom/lib/jsdom/level1/core.js:671:17)
at null.textContent (/path/to/console-highlight/node_modules/jsdom/lib/jsdom/level3/core.js:187:10)
at /path/to/console-highlight/node_modules/htmlout/htmlout.js:94:27
at Array.forEach (native)
at htmlout (/path/to/console-highlight/node_modules/htmlout/htmlout.js:92:15)
at htmlout (/path/to/console-highlight/node_modules/htmlout/htmlout.js:116:12)
at consoleHighlight (/path/to/console-highlight/consoleHighlight.js:20:10)
What's going wrong?
Seeing the same thing on node 4.4.4
Still the same on node 6, but... as this is a very simple library (highlight.js
+ htmlout
) I tried to do it myself and the problem persists... it's an htmlout
fault.