My game wont export

When i export my game(windows, wed mobile and desktop etc.) it won’t export and i just get this error:

06-03-2025 16:31:41 build task failed! TypeError: Cannot read properties of undefined (reading ‘webTestOption’)
at C:\Users\harry\MemoryMadness\extensions\build-plugin-template\dist\hooks.js:1:1448
at Generator.next ()
at C:\Users\harry\MemoryMadness\extensions\build-plugin-template\dist\hooks.js:1:479
at new Promise ()
at C:\Users\harry\MemoryMadness\extensions\build-plugin-template\dist\hooks.js:1:230
at C:\Users\harry\MemoryMadness\extensions\build-plugin-template\dist\hooks.js:1:1373
at BuildTask.handleHook (C:\ProgramData\cocos\editors\Creator\3.8.5\resources\app.asar\builtin\builder\dist\worker\builder\index.ccc:1:13901)
at BuildTask.runPluginTask (C:\ProgramData\cocos\editors\Creator\3.8.5\resources\app.asar\builtin\builder\dist\worker\builder\manager\task-base.ccc:1:1203)
at BuildTask.run (C:\ProgramData\cocos\editors\Creator\3.8.5\resources\app.asar\builtin\builder\dist\worker\builder\index.ccc:1:4646)
at build (C:\ProgramData\cocos\editors\Creator\3.8.5\resources\app.asar\builtin\builder\dist\worker\index.ccc:1:4259)
at Ipc. (C:\ProgramData\cocos\editors\Creator\3.8.5\resources\app.asar\builtin\builder\dist\worker\msg-util.ccc:1:210)

Please can somebody help

Did you extend build process by a build plugin, looks like there’s a bug in extensions/build-plugin-template/source/hooks.ts line 24:

    if (pkgOptions.webTestOption) {  //?? possible error
        console.debug('webTestOption', true);
    }

try fixing it then rebuild extension

i dont remember getting any extensions

your log shows that you did use one, which is ‘build-plugin-template’, it’s a built-in cocos extension
try deleting folder extensions/build-plugin-template, that will fix your problem