Node.js async parallel "TypeError: task is not a function"
<p>I am using the async module to execute parallel tasks. Basically, I have two different files, dashboard.js and Run.js.</p>
<p><strong>Dashboard.js</strong></p>
<pre><code>module.exports = {

    func1 : function(){
        console.log(“Funtion one”);

    },
    func2 : function(){
        console.log(“Funtion two”);
    }

}
</code></pre>
<p><strong>Run.js</strong></p>
<pre><code>    var dashboard = require(‘dashboard.js’);

    var async = require('async');

    async.parallel([dashboard.func1, dashboard.func2],function(err){
        if(err)throws err;
        console.log(“ All function executed”);
   });
</code></pre>
<p>I was expecting func1 and func2 to execute in parallel, but it is throwing the below error.</p>
<pre><code>TypeError: task is not a function
    at C:\Users\..\java\realtime-preview\node_modules\async\lib\async.js:718:13
    at async.forEachOf.async.eachOf (C:\Users\..\java\realtime-preview\node_modules\async\lib\async.js:233:13)
    at _parallel (C:\Users\\java\realtime-preview\node_modules\async\lib\async.js:717:9)
</code></pre>
<p>why can I not use <strong>dashboard.func1, dashboard.func2</strong> even if dashboard.func1 is a function?</p>