2016-04-28 41 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 –

回答