Error: Cannot open file 'C:\...\Project\c2runtime_min.js

  • Problem Description

    Upon Pressing the "Export Project" button, selecting HTML5 Website, and checking the minify script box, will error out: "Error during export: Cannot open file 'C:\...\Project\c2runtime_min.js"

    Exported content DOES NOT function. However, unchecking the minify box yields a working, functioning, game without the error.

    Attach a Capx

    All Capx files.

    Steps to Reproduce Bug

    • Open ANY capx or create new project
    • Press the "export project" button
    • Check the "Minify Script" box
    • Press "Next"
    • Press "Export"
    • Error "Error during export: Cannot open file 'C:\...\Project\c2runtime_min.js" ensues.

    Observed Result

    A non-working game is saved.

    Expected Result

    A working game without errors should be expected.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7 Ultimate - 64-bit SP1

    Construct 2 Version ID

    Release 178 (Tried in both 64-bit and 32-bit) - Personal license

    What I've Tried

    • Uninstalling and reinstalling Construct 2, via scirra.com AND steam
    • Installing Construct 2 release 74 through 168
    • Uninstalling/reinstalling Java 32 AND 64 bit release 67, version 7
    • Uninstalling Java Version 7 update 67, replacing with Java Version 7, update 45
    • Forcing Construct 2 to run in 32-bit mode
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • SOLUTION HAS BEEN FOUND!

    Took about 3 hours [of frustration], but figured it out. After installing the Construct 2 r56 (for reasons of troubleshooting) got the same error message (i.e. cannot open c2runtime_min.js) PLUS debugging data (which is actually really cool). At this point, I'm convinced the problem is with MY computer's software, and not Construct. Debugging data is as follows:

    [quote:1lb5gkqc]Condition: FileExists(min_js)

    File: html5.cpp

    Line: 822

    Function: void __cdecl Exporter::DoExport(class era::IProject *,class era::ILayout *,bool,struct HWND__ *)

    Build: release 56 (64-bit) checked

    Component: HTML5 exporter

    (Last Win32 error: 2)

    Found a random forum about unrelated Java bugs, and decided to see if I have the same version. Upon opening CMD and typing in the command "java -version", it reports back with a similar worded error: "Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'" Boom. It is a problem with java. Now keep in mind, this is even after having updated Java to the most recent version (version 7 update 67).

    Decided to take another look at the Java files on my drive... noticed something out of place.

    The Solution for me: Delete the JRE folder in WINDOWS; it doesn't belong. C:\WINDOWS\jre

    Very strange, but it works likes a charm. Minify Script now works, as does java -version command in CMD.

    Hope this helps you guys out!

  • Yes, the minifier requires Java, so make sure your Java installation is correct/up-to-date. Closing.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)