[LayaAirIDE3]Laya3.2.1命令行打包,编译错误也生成成功
[20352:0102/100424.479:ERROR:node_bindings.cc(378)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.日志显示Script Error: ReferenceError: Game is not defined,编译报错了。
engine libs bin://engine/libs/spine-core-3.8.js,bin://engine/libs/laya.bullet.js,bin://engine/libs/laya.box2D.js
loadLibs: 63.001220703125 ms
initLayaStage: 112.833984375 ms
installPackages: 0.740966796875 ms
scan: 3.616943359375 ms
add main_scene.ls
add ui/ui.atlascfg
add ../src/BuildScript.ts
add ../src/Main.ts
add ../src/storage/StorageProxy.ts
add ~/internal/blueprint.bin
add ~/internal/Box.lm
add ~/internal/Capsule.lm
add ~/internal/Cone.lm
add ~/internal/Cylinder.lm
add ~/internal/DefaultMaterial.lmat
add ~/internal/DefaultParticleMaterial.lmat
add ~/internal/DefaultPrefabEditEnv.ls
add ~/internal/DefaultSkyMaterial.lmat
add ~/internal/DefaultTrailMaterial.lmat
add ~/internal/Plane.lm
add ~/internal/Quad.lm
add ~/internal/sky.jpg
add ~/internal/Sphere.lm
add ~/internal/glTFShader/glTFMetallicRoughness.glsl
add ~/internal/glTFShader/glTFPBR.shader
add ~/internal/glTFShader/glTFPBRInitSurfaceInput.glsl
add ~/internal/shaderBlueprint/lib/BlueprintDepthFrag.glsl
add ~/internal/shaderBlueprint/lib/BlueprintDepthVertex.glsl
add ~/internal/shaderBlueprint/lib/BlueprintNormalDepthFrag.glsl
add ~/internal/shaderBlueprint/lib/BlueprintNormalDepthVertex.glsl
add ~/internal/shaderBlueprint/lib/BlueprintPixel.glsl
add ~/internal/shaderBlueprint/lib/BlueprintPixelFrag.glsl
add ~/internal/shaderBlueprint/lib/BlueprintPixelVertex.glsl
add ~/internal/shaderBlueprint/lib/BlueprintVertex.glsl
add ~/internal/shaderBlueprint/lightmode/BlueprintBlinn.glsl
add ~/internal/shaderBlueprint/lightmode/BlueprintPBRMetal.glsl
add ~/internal/shaderBlueprint/lightmode/BlueprintUnlit.glsl
编译完成,耗时 16 ms
Script Error: ReferenceError: Game is not defined
at /C:/Users/God/AppData/Local/Programs/LayaAirIDE/resources/app.asar/game.js:2
importing ~/internal/Box.lm
importing ~/internal/Capsule.lm
importing ~/internal/Cone.lm
importing ~/internal/Cylinder.lm
importing ~/internal/Plane.lm
native tools encoding set to cp936
importing ~/internal/Quad.lm
importing ~/internal/sky.jpg
importing ~/internal/Sphere.lm
importing ~/internal/glTFShader/glTFPBR.shader
save asset-db
save script-asset-db
watcher start: 1.330078125 ms
scene renderer start: 807.7509765625 ms
load extensions: 9.158935546875 ms
setLayout: 28.31201171875 ms
start login
validate scene
Start build web, destPath=c:\test/release/web
正在初始化
Run .onSetup
正在清理旧数据
开始构建
正在准备资源
ExportAssetTool: 1 assets to parse
ExportAssetTool: 1 assets to parse
正在导出资源
ExportAssetTool: 2 items to write
正在编译和打包脚本
正在拷贝文件
正在创建清单文件
Run .onCreateManifest
正在创建包
正在结束构建
Build end, result=Success
但是还是成功生成,最后的结果也显示result=Success。
在自动化处理上很不便,这种情况有什么办法知道有错误?
命令行如下
LayaAirIDE.exe --project=c:\test --script=BuildScript.buildWeb
没有找到相关结果
已邀请:
要回复问题请先登录
0 个回复