Skip to content

An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.

fix: switch to ESM export to avoid mixed format (#633)

Nathan Marley3a2325a963fe
diff --git a/.changeset/stale-cameras-sin.md b/.changeset/stale-cameras-sin.md
new file mode 100644
index 00000000..e13e1997
--- /dev/null
+++ b/.changeset/stale-cameras-sin.md
@@ -0,0 +1,5 @@
+---
+"task-master-ai": patch
+---
+
+Fix weird `task-master init` bug when using in certain environments
diff --git a/bin/task-master.js b/bin/task-master.js
index ea1c9176..a7d01c07 100755
--- a/bin/task-master.js
+++ b/bin/task-master.js
@@ -373,8 +373,4 @@ if (process.argv.length <= 2) {
}
// Add exports at the end of the file
-if (typeof module !== 'undefined') {
- module.exports = {
- detectCamelCaseFlags
- };
-}
+export { detectCamelCaseFlags };