编译cesium的源代码时出错

时间:2017-10-17 09:38:29

标签: node.js git npm cesium

我想在Windows 7中设置铯。当我设置铯并下载相关软件时,我收到了错误。所以我将向您解释我如何设置和安装以及我从哪里得到错误。

我从这个网站https://git-scm.com/download/win下载并安装git。

我从这个网站下载并安装node.js, https://nodejs.org/en/

我git克隆这个网站,在git bash中使用git clone https://github.com/AnalyticalGraphicsInc/cesium.git

一旦完成,我从节点命令提示符下安装我得到了这个错误 "

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}

" 我研究了这个错误,他们说这是一个警告,所以我继续做下一步。

我更改了cesium源代码,C:\ cesium \ Source \ Widgets \ Animation \ AnimationViewModel.js 我在这段代码中做了修改

AnimationViewModel.defaultDateFormatter = function(date, viewModel) {

    //var gregorianDate = JulianDate.toGregorianDate(date);

    var isoDate = Cesium.JulianDate.toIso8601(date);

    var localDate = new Date(isoDate);

    return monthNames[localDate.getMonth()] + ' ' + localDate.getDate() + ' ' + localDate.getFullYear();

};



AnimationViewModel.defaultTimeFormatter = function(date, viewModel) {

    //var gregorianDate = JulianDate.toGregorianDate(date);

    //var millisecond = Math.round(gregorianDate.millisecond);

    var isoDate = Cesium.JulianDate.toIso8601(date);

    var localDate = new Date(isoDate);

    if (Math.abs(viewModel._clockViewModel.multiplier) < 1) {

        return sprintf('%02d:%02d:%02d.%03d', localDate.getHours(), localDate.getMinutes(), localDate.getSeconds(), localDate.getMilliseconds());

    }

    return sprintf('%02d:%02d:%02d SGT', localDate.getHours(), localDate.getMinutes(), localDate.getSeconds());

}; 

然后我运行npm run release我从下面得到了这个错误..

C:\cesium>npm run release

> cesium@1.38.0 release C:\cesium
> gulp release

[17:22:32] Using gulpfile C:\cesium\gulpfile.js
[17:22:32] Starting 'build'...
[17:22:33] Finished 'build' after 930 ms
[17:22:33] Starting 'generateStubs'...
[17:22:33] Finished 'generateStubs' after 142 ms
[17:22:33] Starting 'combine'...
Building Cesium.js
[17:22:33] Starting 'minifyRelease'...
Building Cesium.js
[17:22:33] Starting 'generateDocumentation'...
Building Source/Workers/cesiumWorkerBootstrapper.js
Building Source/Workers/transferTypedArrayTest.js
Building Source/Workers/cesiumWorkerBootstrapper.js
Building Source/Workers/transferTypedArrayTest.js
Finished Source/Workers/transferTypedArrayTest.js
Building Source/ThirdParty/Workers/inflate.js
Finished Source/Workers/transferTypedArrayTest.js
Building Source/ThirdParty/Workers/inflate.js
Finished Source/Workers/cesiumWorkerBootstrapper.js
Building Source/ThirdParty/Workers/deflate.js
Finished Source/Workers/cesiumWorkerBootstrapper.js
Building Source/ThirdParty/Workers/deflate.js
Finished Source/ThirdParty/Workers/inflate.js
Finished Source/ThirdParty/Workers/deflate.js
Building Source/Workers/combineGeometry.js
Building Source/Workers/createBoxGeometry.js
Finished Source/ThirdParty/Workers/inflate.js
Finished Source/ThirdParty/Workers/deflate.js
Building Source/Workers/combineGeometry.js
Building Source/Workers/createBoxGeometry.js
Finished Cesium.js
Finished Source/Workers/createBoxGeometry.js
Building Source/Workers/upsampleQuantizedTerrainMesh.js
Finished Source/Workers/combineGeometry.js
Building Source/Workers/transcodeCRNToDXT.js
Finished Source/Workers/combineGeometry.js
Building Source/Workers/upsampleQuantizedTerrainMesh.js
Finished Source/Workers/createBoxGeometry.js
Building Source/Workers/transcodeCRNToDXT.js
Finished Source/Workers/upsampleQuantizedTerrainMesh.js
Building Source/Workers/decodeGoogleEarthEnterprisePacket.js
Finished Source/Workers/transcodeCRNToDXT.js
Building Source/Workers/createWallOutlineGeometry.js
Finished Source/Workers/upsampleQuantizedTerrainMesh.js
Building Source/Workers/decodeGoogleEarthEnterprisePacket.js
Finished Source/Workers/transcodeCRNToDXT.js
Building Source/Workers/createWallOutlineGeometry.js
Finished Source/Workers/createWallOutlineGeometry.js
Building Source/Workers/createWallGeometry.js
Finished Source/Workers/decodeGoogleEarthEnterprisePacket.js
Building Source/Workers/createVerticesFromQuantizedTerrainMesh.js
Finished Source/Workers/decodeGoogleEarthEnterprisePacket.js
Building Source/Workers/createWallGeometry.js

[17:24:12] Finished 'generateDocumentation' after 1.63 min
Finished Cesium.js
Finished Source/Workers/createWallGeometry.js
Building Source/Workers/createVerticesFromHeightmap.js
Finished Source/Workers/createWallOutlineGeometry.js
Building Source/Workers/createVerticesFromQuantizedTerrainMesh.js
Finished Source/Workers/createVerticesFromQuantizedTerrainMesh.js
Building Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
Finished Source/Workers/createVerticesFromHeightmap.js
Building Source/Workers/createSphereOutlineGeometry.js
Finished Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
Building Source/Workers/createSphereGeometry.js
Finished Source/Workers/createWallGeometry.js
Building Source/Workers/createVerticesFromHeightmap.js
Finished Source/Workers/createVerticesFromQuantizedTerrainMesh.js
Building Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
Finished Source/Workers/createSphereOutlineGeometry.js
Building Source/Workers/createSimplePolylineGeometry.js
Finished Source/Workers/createSphereGeometry.js
Building Source/Workers/createRectangleOutlineGeometry.js
Finished Source/Workers/createVerticesFromHeightmap.js
Building Source/Workers/createSphereOutlineGeometry.js
Finished Source/Workers/createSimplePolylineGeometry.js
Building Source/Workers/createRectangleGeometry.js
Finished Source/Workers/createRectangleOutlineGeometry.js
Building Source/Workers/createPolylineVolumeOutlineGeometry.js
Finished Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
Building Source/Workers/createSphereGeometry.js
Finished Source/Workers/createRectangleGeometry.js
Building Source/Workers/createPolylineVolumeGeometry.js
Finished Source/Workers/createPolylineVolumeOutlineGeometry.js
Building Source/Workers/createPolylineGeometry.js
Finished Source/Workers/createSphereOutlineGeometry.js
Building Source/Workers/createSimplePolylineGeometry.js
Finished Source/Workers/createPolylineVolumeGeometry.js
Building Source/Workers/createPolygonOutlineGeometry.js
Finished Source/Workers/createSphereGeometry.js
Building Source/Workers/createRectangleOutlineGeometry.js
Finished Source/Workers/createPolylineGeometry.js
Building Source/Workers/createPolygonGeometry.js
Finished Source/Workers/createSimplePolylineGeometry.js
Building Source/Workers/createRectangleGeometry.js
Finished Source/Workers/createPolygonOutlineGeometry.js
Building Source/Workers/createGeometry.js
Finished Source/Workers/createPolygonGeometry.js
Building Source/Workers/createFrustumOutlineGeometry.js
Finished Source/Workers/createRectangleOutlineGeometry.js
Building Source/Workers/createPolylineVolumeOutlineGeometry.js
Finished Source/Workers/createGeometry.js
Building Source/Workers/createFrustumGeometry.js
Finished Source/Workers/createFrustumOutlineGeometry.js
Building Source/Workers/createEllipsoidOutlineGeometry.js
Finished Source/Workers/createRectangleGeometry.js
Building Source/Workers/createPolylineVolumeGeometry.js
Finished Source/Workers/createFrustumGeometry.js
Building Source/Workers/createEllipsoidGeometry.js
Finished Source/Workers/createEllipsoidOutlineGeometry.js
Building Source/Workers/createEllipseOutlineGeometry.js
Finished Source/Workers/createPolylineVolumeOutlineGeometry.js
Building Source/Workers/createPolylineGeometry.js
Finished Source/Workers/createEllipsoidGeometry.js
Building Source/Workers/createEllipseGeometry.js
Finished Source/Workers/createEllipseOutlineGeometry.js
Building Source/Workers/createCylinderOutlineGeometry.js
Finished Source/Workers/createPolylineVolumeGeometry.js
Building Source/Workers/createPolygonOutlineGeometry.js
Finished Source/Workers/createPolylineGeometry.js
Building Source/Workers/createPolygonGeometry.js
Finished Source/Workers/createCylinderOutlineGeometry.js
Building Source/Workers/createCylinderGeometry.js
Finished Source/Workers/createEllipseGeometry.js
Building Source/Workers/createCorridorOutlineGeometry.js
Finished Source/Workers/createCylinderGeometry.js
Building Source/Workers/createCorridorGeometry.js
Finished Source/Workers/createCorridorOutlineGeometry.js
Building Source/Workers/createCircleOutlineGeometry.js
Finished Source/Workers/createPolygonOutlineGeometry.js
Building Source/Workers/createGeometry.js
Finished Source/Workers/createPolygonGeometry.js
Building Source/Workers/createFrustumOutlineGeometry.js
Finished Source/Workers/createCorridorGeometry.js
Building Source/Workers/createCircleGeometry.js
Finished Source/Workers/createCircleOutlineGeometry.js
Building Source/Workers/createBoxOutlineGeometry.js
Finished Source/Workers/createGeometry.js
Building Source/Workers/createFrustumGeometry.js
Finished Source/Workers/createBoxOutlineGeometry.js
Finished Source/Workers/createCircleGeometry.js
[17:26:03] Finished 'combine' after 3.48 min
Finished Source/Workers/createFrustumOutlineGeometry.js
Building Source/Workers/createEllipsoidOutlineGeometry.js
Finished Source/Workers/createFrustumGeometry.js
Building Source/Workers/createEllipsoidGeometry.js
Finished Source/Workers/createEllipsoidOutlineGeometry.js
Building Source/Workers/createEllipseOutlineGeometry.js
Finished Source/Workers/createEllipsoidGeometry.js
Building Source/Workers/createEllipseGeometry.js
Finished Source/Workers/createEllipseOutlineGeometry.js
Building Source/Workers/createCylinderOutlineGeometry.js
Finished Source/Workers/createCylinderOutlineGeometry.js
Building Source/Workers/createCylinderGeometry.js
Finished Source/Workers/createEllipseGeometry.js
Building Source/Workers/createCorridorOutlineGeometry.js
Finished Source/Workers/createCylinderGeometry.js
Building Source/Workers/createCorridorGeometry.js
Finished Source/Workers/createCorridorOutlineGeometry.js
Building Source/Workers/createCircleOutlineGeometry.js
Finished Source/Workers/createCorridorGeometry.js
Building Source/Workers/createCircleGeometry.js
Finished Source/Workers/createCircleOutlineGeometry.js
Building Source/Workers/createBoxOutlineGeometry.js
Finished Source/Workers/createBoxOutlineGeometry.js
Finished Source/Workers/createCircleGeometry.js
Building Source/Widgets/Animation/Animation.css
Building Source/Widgets/Animation/lighter.css
Finished Source/Widgets/Animation/lighter.css
Building Source/Widgets/widgets.css
Error Source/Widgets/Animation/Animation.css
[17:26:49] 'minifyRelease' errored after 4.25 min
[17:26:49] Error: Command failed: npm run requirejs -- --eyJ3cmFwIjp0cnVlLCJ1c2V
TdHJpY3QiOnRydWUsIm9wdGltaXplQ3NzIjoic3RhbmRhcmQiLCJwcmFnbWFzIjp7ImRlYnVnIjp0cnV
lfSwiY3NzSW4iOiJTb3VyY2UvV2lkZ2V0cy9BbmltYXRpb24vQW5pbWF0aW9uLmNzcyIsIm91dCI6IkJ
1aWxkXFxDZXNpdW1cXFdpZGdldHNcXEFuaW1hdGlvblxcQW5pbWF0aW9uLmNzcyJ9 --silent
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cesium@1.38.0 requirejs: `gulp requirejs "--eyJ3cmFwIjp0cnVlLCJ1c2VTdHJ
pY3QiOnRydWUsIm9wdGltaXplQ3NzIjoic3RhbmRhcmQiLCJwcmFnbWFzIjp7ImRlYnVnIjp0cnVlfSw
iY3NzSW4iOiJTb3VyY2UvV2lkZ2V0cy9BbmltYXRpb24vQW5pbWF0aW9uLmNzcyIsIm91dCI6IkJ1aWx
kXFxDZXNpdW1cXFdpZGdldHNcXEFuaW1hdGlvblxcQW5pbWF0aW9uLmNzcyJ9" "--silent"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cesium@1.38.0 requirejs script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\sgshaa11\AppData\Roaming\npm-cache\_logs\2017-10-17T09_26_
49_092Z-debug.log

    at ChildProcess.exithandler (child_process.js:271:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Finished Source/Widgets/widgets.css
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cesium@1.38.0 release: `gulp release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cesium@1.38.0 release script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\sgshaa11\AppData\Roaming\npm-cache\_logs\2017-10-17T09_26_
51_831Z-debug.log

我在安装npm时也遇到了错误。它说明了

npm Error npm WARN deprecated minimatch@2.0.10

向我解释如何解决它。谢谢。

0 个答案:

没有答案