2016-04-28 157 views
0

我想通过使用netcdf(https://www.npmjs.com/package/netcdf)库来在Node.js程序中对NetCDF文件进行编码。netcdf在Node.js程序中不起作用

现在,一旦我运行一个程序,我会在下面得到一个错误。

C:\app [master +2 ~1 -0 !]> npm start 

> [email protected] start C:\app 
> node server.js 

C:\app\node_modules\text-encoding\lib\encoding.js:979 
     throw TypeError('Called as a function. Did you forget \'new\'?'); 
    ^

TypeError: Called as a function. Did you forget 'new'? 
    at TypeError (native) 
    at Object.TextDecoder (C:\app\node_modules\text-encoding\lib\encoding.js:979:13) 
    at Object.<anonymous> (C:\app\node_modules\netcdf\util\readbinary.js:4:40) 
    at Module._compile (module.js:413:34) 
    at Object.Module._extensions..js (module.js:422:10) 
    at Module.load (module.js:357:32) 
    at Function.Module._load (module.js:314:12) 
    at Module.require (module.js:367:17) 
    at require (internal/module.js:16:19) 
    at Object.<anonymous> (C:\app\node_modules\netcdf\util\type.js:4:14) 

npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v\\nodev5.9.1\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\bin\\npm-cli.js" "start" 
npm ERR! node v5.9.1 
npm ERR! npm v3.8.7 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `node server.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node server.js'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the spaceapps package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node server.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs spaceapps 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls spaceapps 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\app\npm-debug.log 
C:\app [master +3 ~1 -0 !]> 

看来库中有错误。 我很感谢有人告诉我一个解决方案。

+0

您应该在存储库上创建问题,而不是https://github.com/metocean/netcdfjs/issues –

回答