3.6.2引擎构建windows平台工程运行报错

3.6.2引擎构建windows平台, 用vs2019打开工程后编译能成功,但是运行程序后报错, 看报错日志是执行脚本的main函数内的 require(“src/system.bundle.js”); 引起
报错信息:
15:21:51 [ERROR]: E/ ERROR: Uncaught Error: Failed to require file ‘src/system.bundle.js’, not found!, location: (no filename):0:0
STACK:

  • [0]anonymous@(no filename):1
  • [1]anonymous@main.js:57

15:21:51 [ERROR]: [ERROR] file E:\engine\3.6.2Custom\engine\native\cocos\application\CocosApplication.cpp: line 154
15:21:51 [ERROR]:
Uncaught Exception:

  • location : (see stack)
  • msg : Uncaught Error: Failed to require file ‘src/system.bundle.js’, not found!
  • detail :
    - [0]anonymous@(no filename):1
  • [1]anonymous@main.js:57

15:21:51 [ERROR]: E/ ScriptEngine::evalString script (no filename), failed!

15:21:51 [ERROR]: E/ [ERROR] Failed to invoke require, location: E:\engine\3.6.2Custom\engine\native\cocos\bindings\manual\jsb_global.cpp:136

15:21:51 [ERROR]: E/ ScriptEngine::evalString catch exception:

15:21:51 [ERROR]: E/ ERROR: Uncaught SyntaxError: Unexpected end of JSON input, location: undefined:0:0
STACK:

  • [0]anonymous@main.js:60

15:21:51 [ERROR]: [ERROR] file E:\engine\3.6.2Custom\engine\native\cocos\application\CocosApplication.cpp: line 154
15:21:51 [ERROR]:
Uncaught Exception:

  • location : (see stack)
  • msg : Uncaught SyntaxError: Unexpected end of JSON input
  • detail :
    - [0]anonymous@main.js:60

15:21:51 [ERROR]: E/ ScriptEngine::evalString script main.js, failed!

build,native 删了重新构建生成看看

也没有用。。。报一样的错,感觉就是执行到了main.js脚本后 然后找不到src路径下的资源和脚本 但是src等路径确实存在 到时候换个环境 换个vs版本什么的试试

如果不使用 vs 来手动生成,直接使用构建面板上的生成运行可以吗?

也是不行的

我也遇到了

使用ndk21重新编译

请问怎么解决的?我现在用3.8.2也遇到这个问题了