Help with build,

Hi,
I have a problem when trying to build the project. [for desktop]
The project run ok in the simulator/browser preview, but stuck on the build process. (it start building a huge “log” file unless interrupted.

The log file is complaining (warn) about dependency like:

  1. -13-2023 18:21:07-warn: [build-script][[Build.Script.Rollup]] Circular dependency: file:///D:/programming/cocosCreator/PuzzleMind1/assets/lastScript.ts → file:///D:/programming/cocosCreator/PuzzleMind1/assets/misc.ts → file:///D:/programming/cocosCreator/PuzzleMind1/assets/lastScript.ts (X lost of similar)

And later:
2. Export “scrollPanels_script_link” of module file:///D:/programming/cocosCreator/PuzzleMind1/assets/main/scrollPanels.ts was reexported through module file:///D:/programming/cocosCreator/PuzzleMind1/assets/lastScript.ts while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. (X lots of other)

I am “solving” the dependency issues in a similar way to what explained here:

→ -> I Have a “main” file who are importing everything from other, and reexporting, and all other files are importing from it. It seem to work, but again happen to have some problem when building. [I am building for desktop]

If someone can help me, please… I dont know what to do.

I don’t know if you’re building as native for a certain reason but you can build as web mobile and then use electron js to build for windows, linux or mac. It’s a lot easier.

Hi,

Thank for the replay, it stuck also when choosing “web mobile”,
I don’t know what it mean to: “use electron js to build for windows,”…

Follow this guide but don’t do the last step which is zip the game up.

Then get started with electron js by following this guide:

Then put the game files from the first guide into a release folder within your electron project folder. Then use win.loadFile(‘release/index.html’); instead in your main.js file.