TypeError: Cannot read property 'length' of null - Node Canvas

Clash Royale CLAN TAG#URR8PPP
TypeError: Cannot read property 'length' of null - Node Canvas
I have tried running my Nodejs script project in Linux which is working just fine but whenever I try running the same project in Windows, it is throwing an error. I have been trying to resolve this issue since last few days. Not sure why I am getting this problem. Please help me guys to resolve this issue. Thanks in advance.
xyznode_modulesbluebirdjsreleaseasync.js:61
fn = function () throw arg; ;
^
TypeError: Cannot read property 'length' of null
at Object.acquireContext (E:app_servernode_moduleschart.jssrcplatformsplatform.dom.js:340:19)
at Chart.construct (E:app_servernode_moduleschart.jssrccorecore.controller.js:79:27)
at new Chart (E:app_servernode_moduleschart.jssrccorecore.js:42:8)
at jsdom.envAsync.then.window (E:app_servernode_moduleschartjs-nodeindex.js:106:31)
at tryCatcher (E:app_servernode_modulesbluebirdjsreleaseutil.js:16:23)
at Promise._settlePromiseFromHandler (E:app_servernode_modulesbluebirdjsreleasepromise.js:512:31)
at Promise._settlePromise (E:app_servernode_modulesbluebirdjsreleasepromise.js:569:18)
at Promise._settlePromise0 (E:app_servernode_modulesbluebirdjsreleasepromise.js:614:10)
at Promise._settlePromises (E:app_servernode_modulesbluebirdjsreleasepromise.js:693:18)
at Promise._fulfill (E:app_servernode_modulesbluebirdjsreleasepromise.js:638:18)
at Object.done (E:app_servernode_modulesbluebirdjsreleasenodeback.js:42:21)
at process.nextTick (E:app_servernode_modulesjsdomlibjsdom.js:320:18)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
2 Answers
2
this error probably not caused by the 'bluebird',I think it is because you access the 'length' property of a variable and the variable is null;
can you add the whole error tips? sorry my reputation is not enough to add a comment;
comment needs 50 reputation... :(
– hu newhuan
Aug 9 at 8:32
My bad captain.
– Gandalf the White
Aug 9 at 8:32
but my script proper run in ubuntu but it could not be run in windows
– Suraj Agarkar
Aug 9 at 8:33
can you add the whole error message in your question description? platform errors can be caused by lots of reasons;
– hu newhuan
Aug 9 at 8:37
Follow these steps:
The code will brake on the error. If the brake will be on a code that is part of bluebird or anything else that you didn't write, go up the stack trace until you hit a line that was written by you. See what is happening in this line and it should be quite simple to understand what went wrong.
bluebird
sorry but it's not a web-based application I am using it as console-based for simply using that for generating a graph using canvas.
– Suraj Agarkar
Aug 10 at 4:55
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
why is this an answer hu, just add this in comment.
– Gandalf the White
Aug 9 at 8:31