# Can't compile, "RootDir not defined" -- please help!!

**URL:** <https://forum.choiceofgames.com/t/cant-compile-rootdir-not-defined-please-help/173713>\
**Category:** ChoiceScript Help\
**Created:** [October 2, 2025, 5:10pm UTC](https://forum.choiceofgames.com/t/cant-compile-rootdir-not-defined-please-help/173713 "2025-10-02T17:10:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrimper](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/shrimper/32/259619_2.png) [@shrimper](https://forum.choiceofgames.com/u/shrimper)\
**Post date:** [October 2, 2025, 5:10pm UTC](https://forum.choiceofgames.com/t/cant-compile-rootdir-not-defined-please-help/173713/1 "2025-10-02T17:10:02Z")

</div>

Not sure if this is the correct category but I hope so?!?! The only post I could find about this on here was more than ten years ago and the solution doesn’t make any sense to me, I don’t understand what I’m meant to do. I have deleted and reinstalled choicescript as well as node.js and I have copy/pasted my scenes over to the new file but it’s not working, which is really frustrating. Run-compile.bat says reference error, rootdir is undefined. I don’t know what this means and I have no idea where to start - I’m not a coder at all. This is kind of time-sensitive?? Please help! It’s worked before!!!

---

<div class="post-metadata">

**Author:** ![cup\_half\_empty](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cup_half_empty/32/273983_2.png) [@cup\_half\_empty](https://forum.choiceofgames.com/u/cup_half_empty)\
**Post date:** [October 2, 2025, 6:23pm UTC](https://forum.choiceofgames.com/t/cant-compile-rootdir-not-defined-please-help/173713/2 "2025-10-02T18:23:39Z")

</div>

Can you paste the full output from the terminal?

---

<div class="post-metadata">

**Author:** ![shrimper](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/shrimper/32/259619_2.png) [@shrimper](https://forum.choiceofgames.com/u/shrimper)\
**Post date:** [October 3, 2025, 7:00am UTC](https://forum.choiceofgames.com/t/cant-compile-rootdir-not-defined-please-help/173713/3 "2025-10-03T07:00:50Z")

</div>

Hi, sorry, what do you mean? Like, pasting each scene to a new file? It will probably take me a while as I have a considerable number but I can try and do that, yes

---

<div class="post-metadata">

**Author:** ![cup\_half\_empty](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cup_half_empty/32/273983_2.png) [@cup\_half\_empty](https://forum.choiceofgames.com/u/cup_half_empty)\
**Post date:** [October 3, 2025, 9:20am UTC](https://forum.choiceofgames.com/t/cant-compile-rootdir-not-defined-please-help/173713/4 "2025-10-03T09:20:38Z")

</div>

No, that’s not what I meant. When you execute `run-compile.bat`, Where do you get the error message? Can you paste the error message exactly as you see it? There might be clues there.

---

<div class="post-metadata">

**Author:** ![Jacic](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/jacic/32/7061_2.png) [@Jacic](https://forum.choiceofgames.com/u/Jacic)\
**Post date:** [October 3, 2025, 11:12am UTC](https://forum.choiceofgames.com/t/cant-compile-rootdir-not-defined-please-help/173713/5 "2025-10-03T11:12:36Z")

</div>

Unsure haven’t ever seen that error before, but do you have a \*scene\_list?  
Otherwise reinstall the choicescript package in case something has gone wonky.
