2016-04-28 8 views
0

Ich versuche, eine NetCDF-Datei in Node.js-Programm zu codieren, mithilfe der netcdf (https://www.npmjs.com/package/netcdf) -Bibliothek.netcdf funktioniert nicht in Node.js-Programm

Jetzt, nachdem ich ein Programm ausgeführt habe, erhalte ich einen Fehler unten.

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 !]> 

Es scheint, dass ein Fehler in einer Bibliothek vorliegt. Ich schätze es, wenn mir jemand eine Lösung dafür sagt.

+0

Sie sollten stattdessen ein Problem im Repository https://github.com/metocean/netcdfjs/issues erstellen –

Antwort

0

Wie der Entwickler sagte, hat er no plans in the short or medium term to continue development, so dass Sie netcdfjs verwenden könnten, dass es eine Javascript-Bibliothek ist, die NetCDF v3-Dateien lesen kann. Da es sich um ein NodeJS-Paket handelt, können Sie es serverseitig ausführen, und für Dateien mit normaler Größe können Sie es online lesen, hier haben Sie eine example.

Verwandte Themen