Avatar of Joseph Jean pierre
Joseph Jean pierre
Flag for India

asked on 

I'm new to node js and wanted to run a sample netcdf program getting below error

OS:Ubuntu 14.x
Installed nodejs from ubuntu software center
Installed npm , Installed netcdf module when running a sample example.js file i get the below error

$nodejs example.js

      throw TypeError('Called as a function. Did you forget \'new\'?');
TypeError: Called as a function. Did you forget 'new'?
    at TypeError (<anonymous>)
    at Object.TextDecoder (/home/joseph/node_modules/netcdf/node_modules/text-encoding/lib/encoding.js:979:13)
    at Object.<anonymous> (/home/joseph/node_modules/netcdf/util/readbinary.js:4:40)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/joseph/node_modules/netcdf/util/type.js:4:14)

source code of example.js attached
JavaScriptWeb Development

Avatar of undefined
Last Comment

8/22/2022 - Mon