# Compile Error: "Export Failed"

**URL:** <https://forum.choiceofgames.com/t/compile-error-export-failed/70536>\
**Category:** ChoiceScript Help\
**Created:** [December 15, 2019, 4:27pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536 "2019-12-15T16:27:14Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![sleepingbearcat](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sleepingbearcat](https://forum.choiceofgames.com/u/sleepingbearcat)\
**Post date:** [December 15, 2019, 4:27pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/1 "2019-12-15T16:27:14Z")

</div>

I’m having trouble with compiling the latest version of my project. I’ve successfully compiled the project before but that was back in 2017.

The error I’m getting is when I try to run the compiler, Firefox tells me:

EXPORT FAILED  
Error: Could not open web/mygame/index.html

Everything seems to work fine locally (the files all exist, the game works, etc.), so I’m not sure what I may be doing wrong. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![trevers17](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/trevers17/32/127415_2.png) [@trevers17](https://forum.choiceofgames.com/u/trevers17)\
**Post date:** [December 15, 2019, 4:31pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/2 "2019-12-15T16:31:16Z")

</div>

Welcome to the COG community! 🙂

Are you using the most recent version of Choicescript? If you’re still using a version from 2017, then you’re probably going to run into tons of errors. There’s also been a lot of errors with Firefox recently - have you tried running the compiler in a different browser?

---

<div class="post-metadata">

**Author:** ![sleepingbearcat](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sleepingbearcat](https://forum.choiceofgames.com/u/sleepingbearcat)\
**Post date:** [December 15, 2019, 9:43pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/3 "2019-12-15T21:43:38Z")

</div>

Thanks for responding! I didn’t have success using Chrome or Explorer/Edge either, so perhaps it is the old version of the compiler. If you can point me to the new version I’d love to give that a try 🙂

---

<div class="post-metadata">

**Author:** ![trevers17](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/trevers17/32/127415_2.png) [@trevers17](https://forum.choiceofgames.com/u/trevers17)\
**Post date:** [December 15, 2019, 10:14pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/4 "2019-12-15T22:14:57Z")

</div>

The latest version is always on GitHub.

> **[dfabulich/choicescript](https://github.com/dfabulich/choicescript)**
>
> ChoiceScript is a language for developing multiple-choice games. - dfabulich/choicescript

---

<div class="post-metadata">

**Author:** ![rinari](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rinari/32/86277_2.png) [@rinari](https://forum.choiceofgames.com/u/rinari)\
**Post date:** [September 2, 2020, 11:26pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/5 "2020-09-02T23:26:13Z")

</div>

I’m running into this issue, too: this is my first time trying to compile my game, so I might be doing something wrong!

I followed @cup_half_empty’s [instructions here.](https://forum.choiceofgames.com/t/how-do-i-customize-the-stat-screen-color-scheme-like-that-of-fallen-hero-rebirth/81178/12)

- I downloaded the most recent version of ChoiceScript.
- I edited my style.css stylesheet and saved it.
- Using CSIDE, I exported my files to my /web/mygame/scenes folder, ensuring it was empty of other files first.
- I downloaded Firefox and set html files to be automatically opened by Firefox.
- I ran the compile.html file in my root folder, and it keeps popping up this error:

EXPORT FAILED  
Error: Could not open web/mygame/index.html

Does anyone know what could be causing this or how to fix it? 🙂

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [September 2, 2020, 11:48pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/6 "2020-09-02T23:48:57Z")

</div>

Does exporting a compilation from within CSIDE work? I appreciate you can’t use a custom stylesheet (yet), just trying to eliminate problem spaces.

But my assumption is that you’ve just not got the paths quite right somewhere.

EDIT: Actually is this all to do with the fact you need to “upload” files now? For compile.html you need to upload your whole CS folder (i.e. choicescript-master).

---

<div class="post-metadata">

**Author:** ![rinari](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rinari/32/86277_2.png) [@rinari](https://forum.choiceofgames.com/u/rinari)\
**Post date:** [September 2, 2020, 11:53pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/7 "2020-09-02T23:53:55Z")

</div>

Oh, I got it to work! I think what happened was that I extracted the files in such a way that there were two “choicescript-master” files nested on top of each other, if that makes any sense! (How does one compile from CSIDE, though?)

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [September 2, 2020, 11:57pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/8 "2020-09-02T23:57:01Z")

</div>

> [@rinari](#):
>
> (How does one compile from CSIDE, though?)

Right-click a project, go to export, then ‘compiled game’:  
 ![image](https://global.discourse-cdn.com/choiceofgames/original/3X/2/d/2d60dafc8a2ed179da6e34b394e78e7a15974550.png)

Not currently available on the web version though.

---

<div class="post-metadata">

**Author:** ![rinari](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rinari/32/86277_2.png) [@rinari](https://forum.choiceofgames.com/u/rinari)\
**Post date:** [September 2, 2020, 11:57pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/9 "2020-09-02T23:57:58Z")

</div>

Oh, thank you! 😭 I’ve been using CSIDE for three years now and I’m still learning things about it haha!

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [September 3, 2020, 12:01am UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/10 "2020-09-03T00:01:35Z")

</div>

More info available in the help tab at: `Home > Basic Topics > Publishing and Exporting`

---

<div class="post-metadata">

**Author:** ![Xiomy\_Gomez](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/xiomy_gomez/32/70350_2.png) [@Xiomy\_Gomez](https://forum.choiceofgames.com/u/Xiomy_Gomez)\
**Post date:** [September 9, 2020, 10:52pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/11 "2020-09-09T22:52:59Z")

</div>

I’ve been trying to learn how to use CSIDE over the last couple of days and i’m confused when i get and error for gender choice, and choices in particular. I would really appreciate some help since this is the 1st time i’m doing this.

---

<div class="post-metadata">

**Author:** ![rinari](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rinari/32/86277_2.png) [@rinari](https://forum.choiceofgames.com/u/rinari)\
**Post date:** [September 9, 2020, 10:58pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/12 "2020-09-09T22:58:07Z")

</div>

It sounds like you’d benefit from posting about your specific issues in the “[ultimate noob coding question thread](https://forum.choiceofgames.com/t/ultimate-noob-coding/28655)” or searching for topics relating to the specific errors you get, @Xiomy_Gomez. The more specific you are about what you’re doing, what errors and messages you’re seeing, or what you’re confused by, the more likely someone will have a solution for you!

---

<div class="post-metadata">

**Author:** ![Xiomy\_Gomez](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/xiomy_gomez/32/70350_2.png) [@Xiomy\_Gomez](https://forum.choiceofgames.com/u/Xiomy_Gomez)\
**Post date:** [September 10, 2020, 8:37pm UTC](https://forum.choiceofgames.com/t/compile-error-export-failed/70536/13 "2020-09-10T20:37:56Z")

</div>

Thank you! I’ll try that.
