-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property split of null #17
Comments
@JacobCooley |
Great! The errors are gone! :D Have any clue why this would be?
|
@JacobCooley |
My librsvg version is 2.40.13-3 |
@JacobCooley |
I'm on linux, so I think the version numbers are a bit different because it says I'm up to date |
@JacobCooley unfortunately, the apt shows the 2.40.13 as the latest, but you can 2.40.20 here. |
It worked fine when I added anychart version 8.3.0 explicitly.
Issue still exists in latest version for anychart - 8.4.2 I had downloaded this module earlier on 23-09-2018 and npm version "anychart-nodejs": "^1.3.8" is working fine in the folder where npm_modules was synced on that day. OS: Windows 10, 64 bit The same code does not work if I create new project with just one npm module dependency "anychart-nodejs": "^1.3.8" in package.json
I get error as below: D:\rnd\anychart\node_modules\anychart-nodejs\lib\anychart-node.js:155
Sample code to create pie is used
|
@chandregowda |
I'm using v8.3.0 on OSX and deploying to Google Firebase Functions and I'm still receiving this issue, as well as a warning I've already followed the instructions on the website and installed using |
@chuakc92 |
@Shestac92
OS Details
Anychart installations:
LIBRSVG
Code
Error: |
@abhishekverma3189 |
OUTPUT |
@abhishekverma3189 Please, try to downgrade the Imagemagick to |
I was able to get it working by using ImageMagick 7.0.7-39 and using "anychart-nodejs": "1.3.0-dev-preview-4", |
@Shestac92 |
Hello, guys ! Could you please help me with issue with rendering of chart ? package.json "dependencies": {
"anychart": "8.8.0",
"anychart-nodejs": "1.3.6" ImageMagick version convert -version
Version: ImageMagick 7.0.10-22 Q16 x86_64 2020-06-30 https://imagemagick.org
Copyright: © 1999-2020 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5)
Delegates (built-in): fontconfig freetype png x zlib Code itself (an example from your site) // require file system and jsdom
var fs = require('fs');
// For jsdom version 10 or higher.
// Require JSDOM Class.
var JSDOM = require('jsdom').JSDOM;
// Create instance of JSDOM.
var jsdom = new JSDOM('<body><div id="container"></div></body>', {runScripts: 'dangerously'});
// Get window
var window = jsdom.window;
// For jsdom version 9 or lower
// var jsdom = require('jsdom').jsdom;
// var document = jsdom('<body><div id="container"></div></body>');
// var window = document.defaultView;
// require anychart and anychart export modules
var anychart = require('anychart')(window);
var anychartExport = require('anychart-nodejs')(anychart);
// create and a chart to the jsdom window.
// chart creating should be called only right after anychart-nodejs module requiring
var chart = anychart.pie([10, 20]);
chart.bounds(0, 0, 800, 600);
chart.container('container');
chart.draw();
// generate JPG image and save it to a file
anychartExport.exportTo(chart, 'png').then(function(image) {
fs.writeFile('anychart.png', image, function(fsWriteError) {
if (fsWriteError) {
console.log(fsWriteError);
} else {
console.log('Complete');
}
});
}, function(generationError) {
console.log(generationError);
}); Error (for node version 10) /Projects/node_modules/anychart-nodejs/lib/anychart-node.js:155
var fontsArr = fontFamily.split(', ');
^
TypeError: Cannot read property 'split' of null
Then i reinstalled to 12 and got next one
|
@Shestac92 , could you please help me with the issue ? |
@gansky-alexander |
Same problem with :
Error is :
|
Can this please be fixed? downgrading anychart to 8.3.0 is not feasible for my project as it uses newer features of anychart like setting maximumGap on the stock charts. |
I don't think there is a way to go back to -11_1 so I think -12 is the only option
I upgraded imagemagick to the latest version and am getting this error
(node:29179) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of null
at HTMLUnknownElement.getBBox (/mnt/c/Projects/cryptoBot/node_modules/anychart-nodejs/lib/anychart-node.js:155:29)
It seems in the getBBox function it's looking for a fontfamily and returning null. Any idea why this would be happening?
It is happening on char.draw()
It is happening with many different example charts I've found for anycharts including the one on this repo
It is still happening if I downgrade to 1.3.6
I have reformatted Ubuntu and it's happening on 16.04 and 18.04.
Here's my code just for sanity check. I'm just trying the example chart just to get it running
EDIT:
I have started using the 1.3.0-dev-preview-4 build for anycharts-nodejs and this error is gone. Only I am getting
Error: Stream yields empty buffer
at Socket. (/mnt/c/Projects/cryptoBot/node_modules/gm/lib/command.js:57:17)
when saving my image. It works with svg and pdf, but I need either jpg, or png
The text was updated successfully, but these errors were encountered: