You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/05/03 03:13:23 UTC

[GitHub] TBBle commented on issue #6575: TypeError: Cannot set property 'font' of null at Object.measureText (node_modules/zrender/lib/contain/text.js:371:18)

TBBle commented on issue #6575: TypeError: Cannot set property 'font' of null    at Object.measureText (node_modules/zrender/lib/contain/text.js:371:18)
URL: https://github.com/apache/incubator-echarts/issues/6575#issuecomment-386181504
 
 
   Turns out's hitting this:
   ```js
   notImplemented(
         "HTMLCanvasElement.prototype.getContext (without installing the canvas npm package)",
         this._ownerDocument._defaultView
       );
   ```
   
   See https://github.com/facebook/jest/issues/5168
   
   For some reason, the `notImplemented` failure doesn't bubble up or output anywhere, so this wasn't reported in the output logs.
   
   The solution is to install something like [canvas](http://npmjs.com/package/canvas), [canvas-prebuilt](https://www.npmjs.com/package/canvas-prebuilt) or [jest-canvas-mock](https://www.npmjs.com/package/jest-canvas-mock). That last option needs to be (simply) integrated into your project.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org