问题描述:
1、提示执行成功。
[ok@spark40 apps]$ node server.js
Cesium development server running locally.  Connect to http://localhost:8088/

2、但是不能访问,端口号也不存在;

[ok@spark40 apps]$ ps -ef|grep 8088
ok       14027 13761  0 10:56 pts/2    00:00:00 grep 8088
3、Linux本地访问地址也没有内容返回,即本地不能访问。

[ok@spark40 apps]$ curl ip:8088
curl: (52) Empty reply from server

解决思路:

1、8088端口不存在==> 没有成功启动,提示成功的原因未知。

2、获取包:wget wget cesiumjs.org/releases/Cesium-1.32.zip

解压缩:unzip wget cesiumjs.org/releases/Cesium-1.32.zip -d cesium

执行:node  server.js

缺少组件,

安装组件:

npm install express

npm install compression

npm install request

 WARN engine request@2.81.0: wanted: {"node":">= 4"} (current: {"node":"v0.10.48","npm":"1.3.6"})

npm WARN engine form-data@2.1.4: wanted: {"node":">= 0.12"} (current: {"node":"v0.10.48","npm":"1.3.6"})
npm WARN engine http-signature@1.1.1: wanted: {"node":">=0.8","npm":">=1.3.7"} (current: {"node":"v0.10.48","npm":"1.3.6"})
npm WARN engine har-validator@4.2.1: wanted: {"node":">=4"} (current: {"node":"v0.10.48","npm":"1.3.6"})

npm WARN engine har-schema@1.0.5: wanted: {"node":">=4"} (current: {"node":"v0.10.48","npm":"1.3.6"})npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"v0.10.48","npm":"1.3.6"})

npm install yargs

可能是版本的问题!

3、

http://localhost:8088/
这里写的是localhost:8088,尝试访问curl localhost:8088, 能访问。是IP的问题!!!

server.js里面的localhost全部替换成ip,可以访问。问题解决!!!





Logo

更多推荐