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

Bugs will be moved here once resolved.

Post » Sun Aug 31, 2014 12:12 pm

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 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
Posts: 4
Reputation: 183

Post » Sun Aug 31, 2014 1:20 pm


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:

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!
Posts: 4
Reputation: 183

Post » Thu Sep 04, 2014 2:57 pm

Yes, the minifier requires Java, so make sure your Java installation is correct/up-to-date. Closing.
Scirra Founder
Posts: 24,916
Reputation: 198,680

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests