请问Creator 3.0构建发布的错误


空包也构建失败
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.\n - configuration.entry should be an non-empty array.\n -> A non-empty array of non-empty strings\nThis may indicates the core-js polyfill is not necessary. See https://github.com/zloirock/core-js/issues/822"
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.\n - configuration.entry should be an non-empty array.\n -> A non-empty array of non-empty strings\nThis may indicates the core-js polyfill is not necessary. See https://github.com/zloirock/core-js/issues/822"

Note: The code generator has deoptimised the styling of D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\resources\3d\engine\cocos\dragonbones\lib\dragonBones.js as it exceeds the max of 500KB.

at NewConsole.error (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\builtin\builder\dist\worker\console.js:1:1154)

at normalizeOptions (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\node_modules@babel\generator\lib\index.js:67:15)

at new Generator (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\node_modules@babel\generator\lib\index.js:17:20)

at _default (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\node_modules@babel\generator\lib\index.js:92:15)

at generateCode (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\lib\transformation\file\generate.js:57:39)

at run (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\lib\transformation\index.js:55:33)

来个大佬帮帮忙

用3.0rc 试过了吗,是构建的时候就这样还是编译生成的时候报的错

第一次构建的时候会报这个错误
Note: The code generator has deoptimised the styling of D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\resources\3d\engine\cocos\dragonbones\lib\dragonBones.js as it exceeds the max of 500KB.

at NewConsole.error (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\builtin\builder\dist\worker\console.js:1:1154)

at normalizeOptions (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\node_modules@babel\generator\lib\index.js:67:15)

at new Generator (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\node_modules@babel\generator\lib\index.js:17:20)

at _default (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\node_modules@babel\generator\lib\index.js:92:15)

at generateCode (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\lib\transformation\file\generate.js:57:39)

at run (D:\CocosDashboard\Creator\3.0.0-Preview.1\resources\app.asar\node_modules@babel\core\lib\transformation\index.js:55:33)

编译的时候报的就是这个错误
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.\n - configuration.entry should be an non-empty array.\n -> A non-empty array of non-empty strings\nThis may indicates the core-js polyfill is not necessary. See https://github.com/zloirock/core-js/issues/822"

用as可以编不,能试试?我这边无法复现。

这个我没试过,我试试

问题已解决

啥问题啊 我的也是,没有找到原因

我用 3.1 版本也遇到这个问题了,AS 也编译失败,是同样的错误。使用 3.0 版本的时候没有问题。

2021-5-14 16:17-log: // ---- Merging Texture2D json ----
2021-5-14 16:17-log: // ---- Group json ----
2021-5-14 16:17-debug: Merging Texture2D json √28%
2021-5-14 16:17-debug: Number of json group: 5
2021-5-14 16:17-log: // ---- ----
2021-5-14 16:17-debug: Process: heapTotal 204.65MB heapUsed 172.27MB rss 465.74MB
2021-5-14 16:17-debug: start28%
2021-5-14 16:17-debug: Process: heapTotal 204.65MB heapUsed 172.23MB rss 465.74MB
2021-5-14 16:17-debug: Group json start22%
2021-5-14 16:17-debug: Caught exception during build core-js: WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

2021-5-14 16:25-debug: Process: heapTotal 272.58MB heapUsed 253.78MB rss 501.70MB
2021-5-14 16:25-debug: native:(onAfterBuild) start…95%
2021-5-14 16:25-log: [plugin Generate]: running …
2021-5-14 16:25-log: generate android
2021-5-14 16:25-debug: // ---- native:(onAfterBuild) success ----
2021-5-14 16:25-debug: // ---- cocos-service:(onAfterBuild) ----
2021-5-14 16:25-debug: native:(onAfterBuild)97%
2021-5-14 16:25-debug: cocos-service:(onAfterBuild) start…97%
2021-5-14 16:25-log: [plugin Generate]: done!
2021-5-14 16:25-debug: Process: heapTotal 272.58MB heapUsed 254.15MB rss 501.71MB
2021-5-14 16:25-debug: // ---- cocos-service:(onAfterBuild) success ----
2021-5-14 16:25-debug: cocos-service:(onAfterBuild)100%
2021-5-14 16:25-debug: Use build file cocos.compile.config.json in root(/Users/shawn/ykcode/ccc-3/game31/TestFps/build/android)
2021-5-14 16:25-debug: init options success
2021-5-14 16:25-debug: // ---- native:(make) ----
2021-5-14 16:25-log: [plugin Generate]: running …
2021-5-14 16:25-log: generate android
2021-5-14 16:25-log: [plugin Generate]: done!
2021-5-14 16:25-log: [plugin Compile]: running …
2021-5-14 16:25-log: [runCmd]: /Users/shawn/ykcode/ccc-3/game31/TestFps/build/android/proj/gradlew TestFps31:assembleDebug

2021-5-14 16:33-log: [runCmd /Users/shawn/ykcode/ccc-3/game31/TestFps/build/android/proj/gradlew] > Task :TestFps31:packageDebug FAILED

2021-5-14 16:33-log: [runCmd /Users/shawn/ykcode/ccc-3/game31/TestFps/build/android/proj/gradlew - error]
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:TestFps31:packageDebug’.

A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
java.lang.OutOfMemoryError (no error message)

咋解决的啊?

重启PC,删除build目录后重新构建,问题消失了