首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >netcdf在Node.js程序中不起作用

netcdf在Node.js程序中不起作用
EN

Stack Overflow用户
提问于 2016-04-28 10:40:58
回答 1查看 434关注 0票数 0

我正在尝试使用netcdf(https://www.npmjs.com/package/netcdf)库在Node.js程序中编码一个NetCDF文件。

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

代码语言:javascript
复制
C:\app [master +2 ~1 -0 !]> npm start

> spaceapps@1.0.0 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! spaceapps@1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spaceapps@1.0.0 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 !]>

似乎库中有一个错误。如果有人能告诉我一个解决方案,我将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2016-11-08 00:12:31

正如开发人员所说,他有no plans in the short or medium term to continue development,所以你可以考虑使用netcdfjs,这是一个允许读取NetCDF v3文件的javascript库。因为它是一个NodeJS包,所以您可以在服务器端运行它,对于常规大小的文件,您可以在线阅读它,这里有一个example

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36904317

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档