@@ -5,7 +5,7 @@ enum CommandResolver {
55 private static let helperName = " openclaw "
66
77 static func gatewayEntrypoint( in root: URL ) -> String ? {
8- let distEntry = root. appendingPathComponent ( " dist/index.mjs " ) . path
8+ let distEntry = root. appendingPathComponent ( " dist/index.js " ) . path
99 if FileManager ( ) . isReadableFile ( atPath: distEntry) { return distEntry }
1010 let openclawEntry = root. appendingPathComponent ( " openclaw.mjs " ) . path
1111 if FileManager ( ) . isReadableFile ( atPath: openclawEntry) { return openclawEntry }
@@ -271,7 +271,7 @@ enum CommandResolver {
271271 }
272272
273273 let missingEntry = """
274- openclaw entrypoint missing (looked for dist/index.mjs or openclaw.mjs); run pnpm build.
274+ openclaw entrypoint missing (looked for dist/index.js or openclaw.mjs); run pnpm build.
275275 """
276276 return self . errorCommand ( with: missingEntry)
277277
@@ -360,10 +360,10 @@ enum CommandResolver {
360360 if command -v openclaw >/dev/null 2>&1; then
361361 CLI= " $(command -v openclaw) "
362362 openclaw \( quotedArgs) ;
363- elif [ -n " ${PRJ:-} " ] && [ -f " $PRJ/dist/index.mjs " ]; then
363+ elif [ -n " ${PRJ:-} " ] && [ -f " $PRJ/dist/index.js " ]; then
364364 if command -v node >/dev/null 2>&1; then
365- CLI= " node $PRJ/dist/index.mjs "
366- node " $PRJ/dist/index.mjs " \( quotedArgs) ;
365+ CLI= " node $PRJ/dist/index.js "
366+ node " $PRJ/dist/index.js " \( quotedArgs) ;
367367 else
368368 echo " Node >=22 required on remote host " ; exit 127;
369369 fi
0 commit comments