救命,creator编辑器又打不开了!

一旦选择了自定义的引擎,编辑器就打不开了!自定义引擎编译也没有提示错误

是不是有什么缓存文件需要删啊???
Cocos Creator 3.6.1

错误日志
PS D:\CocosCreator-v3.6.1-win-091618> D:\CocosCreator-v3.6.1-win-091618\CocosCreator.exe --project C:\Users\zhouqi\Desktop\NewProject
PS D:\CocosCreator-v3.6.1-win-091618>
PS D:\CocosCreator-v3.6.1-win-091618>
PS D:\CocosCreator-v3.6.1-win-091618> cosCreator.exe: true
project: C:\Users\zhouqi\Desktop\NewProject
dev: false
home: C:\Users\zhouqi.CocosCreator

[Package] menu@1.0.0 enable
[Package] profile@1.0.0 enable
[Package] project@1.0.2 enable
[Package] messages@1.0.0 enable
[Package] program@1.0.0 enable
[Package] tester@1.0.0 enable
[Package] preferences@1.0.0 enable
[EditorQuickCompiler]Version information looks good.
Metrics error
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) {
errno: -4077,
code: ‘ECONNRESET’,
syscall: ‘read’
}
Metrics error
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) {
errno: -4077,
code: ‘ECONNRESET’,
syscall: ‘read’
}
Start Quick Compile
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
QuickCompiler:Bundling target 0: 3.752s
QuickCompiler:Compile target 0: 7.097s
QuickCompiler:Bundling target 1: 3.783s
QuickCompiler:Compile target 1: 7.405s
Quick Compile: 14570ms
engine:compile-custom-engine-with-caching-success (14759ms)
Load engine in E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1
Profile changed: engine (modules.includeModules: 2d,animation,audio,base,dragon-bones,gfx-webgl,gfx-webgl2,intersection-2d,marionette,particle-2d,physics-2d-box2d,profiler,skeletal-animation,spine,tiled-map,tween,ui,video,webview,xr)
Register native engine in D:\CocosCreator-v3.6.1-win-091618\resources\resources\3d\engine\native
[Package] engine@1.0.6 enable
[Package] programming@1.0.0 enable

[Package] device@1.0.1 enable
[Package] ui-kit@1.0.1 enable
[Package] engine-extends@1.0.0 enable
[Package] asset-db@1.0.0 enable

[Package] scene@1.0.0 enable
[Package] server@1.0.0 enable
[Package] utils@1.0.0 enable
Preview import map: {
“imports”: {
“cc”: “cce:/internal/x/cc”,
“cc/env”: “cc/editor/populate-internal-constants”,
“cce.env”: “cc/editor/populate-internal-constants”,
“cc/userland/macro”: “./x/userland/macro”
}
}
Error [TypeError]: Only absolute URLs are supported
at getNodeRequestOptions (E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:6421:9)
at E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:6526:19
at new Promise ()
at fetch (E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:6523:9)
at SystemJS.fetch (E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:3588:25)
at SystemJS. (E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:3515:15)
at SystemJS. (E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:9060:26)
at SystemJS.instantiate (E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:9091:34)
at E:\afksanguo\Unity2Cocos\CocosEngine\engine-3.6.1\bin.cache\dev\editor\loader.js:3061:19 {
code: -1
}
[Asset DB] Only absolute URLs are supported

看起来是引擎里丢失了什么模块。
有可能是分支对不上,另外可以试试删除engine里的 bin/cache 文件夹,然后重启编辑器~

:sweat_smile:

分支应该是对的,因为我一直在用这个版本开发之前都是好的,昨天忽然不对了。
bin/cache删了重启也没有用。

看上面的日志写着[Asset DB] Only absolute URLs are supported
Preview import map: {
“imports”: {
“cc”: “cce:/internal/x/cc”,
“cc/env”: “cc/editor/populate-internal-constants”,
“cce.env”: “cc/editor/populate-internal-constants”,
“cc/userland/macro”: “./x/userland/macro”
}
}
这里最后一个路径“cc/userland/macro”: “./x/userland/macro”,
恰好是一个相对路径,是不是和这个有关?这个路径又是从哪来的呢?

可以看看自定义引擎里有做了什么本地的改动吗

我找到了出问题的地方,但是无法理解。我在引擎里面增加了一个类,如下图:

只要我把红线的代码注释掉,重新编译引擎,编辑器就可以正常启动了!
放开注释,重新编译引擎,就一定会出上面的错!

功能裁剪了?头像是本人吗

dash 重新下载的编辑器版本能打开吗?

解决了。
就是上面的那个代码
import { Widget } from ‘…/…/ui/Widget’; 路径里的Widget应该是小写,widget。
这错误提示太难定位到这个问题了。。。

1赞